Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r51875:ba117ac345c3
Date: 2012-01-27 12:32 +0100
http://bitbucket.org/pypy/pypy/changeset/ba117ac345c3/

Log:    exec can no longer modify the local scope, so use an explicit scope
        instead

diff --git a/pypy/interpreter/test/test_syntax.py 
b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -164,8 +164,9 @@
     def test_condexpr(self):
         for s, expected in [("x = 1 if True else 2", 1),
                             ("x = 1 if False else 2", 2)]:
-            exec(s)
-            assert x == expected
+            ns = {}
+            exec(s, ns)
+            assert ns['x'] == expected
 
     def test_condexpr_no_warning(self):
         import warnings
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to