summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compiler.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
commit7cae87ca7b0a3a7ce497cbd335c8ec82fe680476 (patch)
tree612cc46e728bef49b19f3d4bc26fa4951b2c1c83 /Lib/test/test_compiler.py
parent4e472e05bdddde72d91d6f25d6e048371cf3c9be (diff)
downloadcpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.zip
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.gz
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.bz2
Patch #1550800: make exec a function.
Diffstat (limited to 'Lib/test/test_compiler.py')
-rw-r--r--Lib/test/test_compiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py
index 81f2ea8..783a34c 100644
--- a/Lib/test/test_compiler.py
+++ b/Lib/test/test_compiler.py
@@ -61,7 +61,7 @@ class CompilerTest(unittest.TestCase):
c = compiler.compile("try:\n 1/0\nexcept:\n e = 1\nfinally:\n f = 1",
"<string>", "exec")
dct = {}
- exec c in dct
+ exec(c, dct)
self.assertEquals(dct.get('e'), 1)
self.assertEquals(dct.get('f'), 1)
@@ -73,7 +73,7 @@ class CompilerTest(unittest.TestCase):
self.assert_('__doc__' in c.co_names)
c = compiler.compile('def f():\n "doc"', '<string>', 'exec')
g = {}
- exec c in g
+ exec(c, g)
self.assertEquals(g['f'].__doc__, "doc")
def testLineNo(self):
@@ -113,7 +113,7 @@ class CompilerTest(unittest.TestCase):
'<string>',
'exec')
dct = {}
- exec c in dct
+ exec(c, dct)
self.assertEquals(dct.get('result'), 3)
def testGenExp(self):