[pypy-commit] pypy py3k: py3k-ify

antocuni noreply at buildbot.pypy.org
Tue Apr 17 17:58:24 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r54468:e2298258f8a6
Date: 2012-04-17 12:19 +0200
http://bitbucket.org/pypy/pypy/changeset/e2298258f8a6/

Log:	py3k-ify

diff --git a/pypy/module/array/test/test_array.py b/pypy/module/array/test/test_array.py
--- a/pypy/module/array/test/test_array.py
+++ b/pypy/module/array/test/test_array.py
@@ -411,7 +411,7 @@
             buf[3] = b'L'
         except TypeError:
             skip("memoryview(array) returns a read-only buffer on CPython")
-        assert a.tostring() == 'helLo'
+        assert a.tostring() == b'helLo'
 
     def test_buffer_keepalive(self):
         buf = memoryview(self.array('b', b'text'))
@@ -744,12 +744,12 @@
                 self.append(8)
 
             def fromunicode(self, lst):
-                self.append(u'9')
+                self.append('9')
 
             def extend(self, lst):
                 self.append(10)
 
-        assert repr(mya('u', u'hi')) == "array('u', 'hi')"
+        assert repr(mya('u', 'hi')) == "array('u', 'hi')"
         assert repr(mya('i', [1, 2, 3])) == "array('i', [1, 2, 3])"
         assert repr(mya('i', (1, 2, 3))) == "array('i', [1, 2, 3])"
 
@@ -762,7 +762,7 @@
         assert repr(a) == "array('b', [8])"
 
         a = mya('u')
-        a.fromunicode(u'hi')
+        a.fromunicode('hi')
         assert repr(a) == "array('u', '9')"
 
         a = mya('i')
@@ -784,7 +784,7 @@
         assert mya('u', 'hi').tobytes() == 'str'
         assert mya('u', 'hi').tounicode() == 'unicode'
 
-        assert repr(mya('u', u'hi')) == "array('u', 'hi')"
+        assert repr(mya('u', 'hi')) == "array('u', 'hi')"
         assert repr(mya('i', [1, 2, 3])) == "array('i', [1, 2, 3])"
         assert repr(mya('i', (1, 2, 3))) == "array('i', [1, 2, 3])"
 


More information about the pypy-commit mailing list