diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-09 10:40:39 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-09 10:40:39 -0400 |
commit | 9e02cfc09f15b08c1b99c39df1e5248eeaace001 (patch) | |
tree | 171f2dde3daab78b0f7e72ef7be32b01cdbe3016 /test/test_execfile.py | |
parent | da75222fa286588394da7f689d47bd53716ffaa1 (diff) | |
download | python-coveragepy-git-9e02cfc09f15b08c1b99c39df1e5248eeaace001.tar.gz |
Also make __builtins__ available in main programs.
Diffstat (limited to 'test/test_execfile.py')
-rw-r--r-- | test/test_execfile.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_execfile.py b/test/test_execfile.py index fc5b52a4..de1a575c 100644 --- a/test/test_execfile.py +++ b/test/test_execfile.py @@ -33,12 +33,15 @@ class RunTest(CoverageTest): # Argv should have the proper values. self.assertEqual(mod_globs['argv'], [tryfile, "arg1", "arg2"]) + # __builtins__ should have the right values, like open(). + self.assertEqual(mod_globs['__builtins__.has_open'], True) + def test_no_extra_file(self): # Make sure that running a file doesn't create an extra compiled file. self.makeFile("xxx", """\ print "a non-.py file!" """) - + self.assertEqual(os.listdir("."), ["xxx"]) run_python_file("xxx", ["xxx"]) self.assertEqual(os.listdir("."), ["xxx"]) |