[pypy-commit] pypy py3k: Some applevel code porting for test_interpreter

rguillebert noreply at buildbot.pypy.org
Sat Jan 21 10:49:06 CET 2012


Author: Romain Guillebert <romain.py at gmail.com>
Branch: py3k
Changeset: r51562:76974f372468
Date: 2012-01-21 10:48 +0100
http://bitbucket.org/pypy/pypy/changeset/76974f372468/

Log:	Some applevel code porting for test_interpreter

diff --git a/pypy/interpreter/test/test_interpreter.py b/pypy/interpreter/test/test_interpreter.py
--- a/pypy/interpreter/test/test_interpreter.py
+++ b/pypy/interpreter/test/test_interpreter.py
@@ -265,7 +265,7 @@
         out = Out()
         try:
             sys.stdout = out
-            print 10
+            print(10)
             assert out.args == ['10','\n']
         finally:
             sys.stdout = save
@@ -281,15 +281,15 @@
                 self.data.append((type(x), x))
         sys.stdout = out = Out()
         try:
-            print unichr(0xa2)
+            print(unichr(0xa2))
             assert out.data == [(unicode, unichr(0xa2)), (str, "\n")]
             out.data = []
             out.encoding = "cp424"     # ignored!
-            print unichr(0xa2)
+            print(unichr(0xa2))
             assert out.data == [(unicode, unichr(0xa2)), (str, "\n")]
             del out.data[:]
             del out.encoding
-            print u"foo\t", u"bar\n", u"trick", u"baz\n"  # softspace handling
+            print "foo\t", "bar\n", "trick", "baz\n"  # softspace handling
             assert out.data == [(unicode, "foo\t"),
                                 (unicode, "bar\n"),
                                 (unicode, "trick"),
@@ -307,7 +307,7 @@
         def f(): f()
         try:
             f()
-        except RuntimeError, e:
+        except RuntimeError as e:
             assert str(e) == "maximum recursion depth exceeded"
         else:
             assert 0, "should have raised!"


More information about the pypy-commit mailing list