[pypy-svn] r63086 - pypy/trunk/pypy/interpreter/test

pedronis at codespeak.net pedronis at codespeak.net
Thu Mar 19 17:14:47 CET 2009


Author: pedronis
Date: Thu Mar 19 17:14:43 2009
New Revision: 63086

Modified:
   pypy/trunk/pypy/interpreter/test/test_exec.py
Log:
(iko, pedronis)

test about the compiler issue :( that is the root of the test_code test_code_extra failure



Modified: pypy/trunk/pypy/interpreter/test/test_exec.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_exec.py	(original)
+++ pypy/trunk/pypy/interpreter/test/test_exec.py	Thu Mar 19 17:14:43 2009
@@ -201,3 +201,19 @@
             eval("'unmatched_quote")
         except SyntaxError, msg:
             assert msg.filename == '<string>'
+
+    def test_exec_and_name_lookups(self):
+        ns = {}
+        exec """def f():
+        exec 'x=1' in locals()
+        return x
+""" in ns
+
+        f = ns['f']
+
+        try:
+            res = f()
+        except NameError, e: # keep py.test from exploding confused
+            raise e
+
+        assert res == 1



More information about the Pypy-commit mailing list