[pypy-commit] pypy py3.5: 2to3fy tests

rlamy pypy.commits at gmail.com
Mon Jun 5 11:00:43 EDT 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r91528:2ce7423bee79
Date: 2017-06-05 15:53 +0100
http://bitbucket.org/pypy/pypy/changeset/2ce7423bee79/

Log:	2to3fy tests

diff --git a/pypy/module/pypyjit/test_pypy_c/test_buffers.py b/pypy/module/pypyjit/test_pypy_c/test_buffers.py
--- a/pypy/module/pypyjit/test_pypy_c/test_buffers.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_buffers.py
@@ -6,8 +6,8 @@
         def main(n):
             import re
             import array
-            p = re.compile('.+')
-            a = array.array('c', 'test' * 1000)
+            p = re.compile(b'.+')
+            a = array.array('B', b'test' * 1000)
             i = 0
             while i < n:
                 i += 1
@@ -30,7 +30,7 @@
         def main(n):
             import _struct as struct
             import array
-            a = array.array('c', struct.pack('i', 42))
+            a = array.array('B', struct.pack('i', 42))
             i = 0
             while i < n:
                 i += 1
diff --git a/pypy/module/pypyjit/test_pypy_c/test_struct.py b/pypy/module/pypyjit/test_pypy_c/test_struct.py
--- a/pypy/module/pypyjit/test_pypy_c/test_struct.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_struct.py
@@ -154,7 +154,7 @@
         def main(n):
             import array
             import struct
-            buf = array.array('b', '\x00'*8)
+            buf = array.array('b', b'\x00'*8)
             i = 1
             while i < n:
                 struct.pack_into("h", buf, 4, i)     # ID: pack_into


More information about the pypy-commit mailing list