Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r55237:16a6b785b86d
Date: 2012-05-31 16:20 +0200
http://bitbucket.org/pypy/pypy/changeset/16a6b785b86d/

Log:    bytes vs unicode and print() function

diff --git a/pypy/module/gc/test/test_app_referents.py 
b/pypy/module/gc/test/test_app_referents.py
--- a/pypy/module/gc/test/test_app_referents.py
+++ b/pypy/module/gc/test/test_app_referents.py
@@ -17,7 +17,7 @@
     w_f = space.appexec([space.wrap(filename)], """(filename):
             import gc
             f = open(filename, 'wb')
-            f.write('X')
+            f.write(b'X')
             return f""")
     assert os.path.getsize(filename) == 0   # the 'X' was not flushed yet
     try:
diff --git a/pypy/module/gc/test/test_referents.py 
b/pypy/module/gc/test/test_referents.py
--- a/pypy/module/gc/test/test_referents.py
+++ b/pypy/module/gc/test/test_referents.py
@@ -57,7 +57,7 @@
         lst = gc.get_rpy_referents(x)
         # After translation, 'lst' should contain the RPython-level list
         # (as a GcStruct).  Before translation, the 'wrappeditems' list.
-        print lst
+        print(lst)
         lst2 = [x for x in lst if type(x) is gc.GcRef]
         assert lst2 != []
         # In any case, we should land on 'y' after one or two extra levels
@@ -73,7 +73,7 @@
     def test_get_rpy_memory_usage(self):
         import gc
         n = gc.get_rpy_memory_usage(12345)
-        print n
+        print(n)
         assert 4 <= n <= 64
 
     def test_get_rpy_type_index(self):
@@ -84,7 +84,7 @@
         n2 = gc.get_rpy_type_index(23456)
         n3 = gc.get_rpy_type_index(1.2)
         n4 = gc.get_rpy_type_index(Foo())
-        print n1, n2, n3, n4
+        print(n1, n2, n3, n4)
         assert n1 == n2
         assert n1 != n3
         assert n1 != n4
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to