Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52270:5547097bed40
Date: 2012-02-09 12:15 +0100
http://bitbucket.org/pypy/pypy/changeset/5547097bed40/

Log:    py3k-ify this test (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
@@ -912,11 +912,13 @@
         source = """def _f(a):
             return a.f(a=a)
         """
-        exec source
-        code = _f.func_code
+        ns = {}
+        exec(source, ns)
+        code = ns['_f'].__code__
         
-        import StringIO, sys, dis
-        s = StringIO.StringIO()
+        import sys, dis
+        from io import StringIO
+        s = StringIO()
         out = sys.stdout
         sys.stdout = s
         try:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to