Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52274:9ee901b301cb
Date: 2012-02-09 12:23 +0100
http://bitbucket.org/pypy/pypy/changeset/9ee901b301cb/

Log:    py3k-ify this test as well (again*2 :-)) (syntax, exec and local
        scope, StringIO)

diff --git a/pypy/interpreter/test/test_compiler.py 
b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -764,10 +764,12 @@
         source = """def f():
             return 3
 """
-        exec source
-        code = f.func_code
-        import dis, sys, StringIO
-        s = StringIO.StringIO()
+        ns = {}
+        exec(source, ns)
+        code = ns['f'].func_code
+        import dis, sys
+        from io import StringIO
+        s = StringIO()
         so = sys.stdout
         sys.stdout = s
         try:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to