[pypy-commit] pypy py3.5: random attempts at fixing tests

arigo pypy.commits at gmail.com
Tue Nov 29 11:53:54 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r88752:d2ee95db07b2
Date: 2016-11-29 17:33 +0100
http://bitbucket.org/pypy/pypy/changeset/d2ee95db07b2/

Log:	random attempts at fixing tests

diff --git a/pypy/module/pypyjit/test_pypy_c/test_ffi.py b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
--- a/pypy/module/pypyjit/test_pypy_c/test_ffi.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
@@ -272,11 +272,11 @@
             _write = libc.load_function(BWrite, 'write')
             i = 0
             fd0, fd1 = os.pipe()
-            buffer = _cffi_backend.newp(BCharP, 'A')
+            buffer = _cffi_backend.newp(BCharP, b'A')
             while i < 300:
                 tmp = _write(fd1, buffer, 1)   # ID: cfficall
                 assert tmp == 1
-                assert os.read(fd0, 2) == 'A'
+                assert os.read(fd0, 2) == b'A'
                 i += 1
             os.close(fd0)
             os.close(fd1)
@@ -410,7 +410,7 @@
         i161 = int_lt(i160, i43)
         guard_true(i161, descr=...)
         i162 = int_add(i160, 1)
-        setfield_gc(p22, i162, descr=<FieldS pypy.module.__builtin__.functional.W_XRangeIterator.inst_current .>)
+        setfield_gc(p22, i162, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current .>)
         guard_not_invalidated(descr=...)
         p163 = force_token()
         p164 = force_token()
diff --git a/pypy/module/pypyjit/test_pypy_c/test_globals.py b/pypy/module/pypyjit/test_pypy_c/test_globals.py
--- a/pypy/module/pypyjit/test_pypy_c/test_globals.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_globals.py
@@ -16,5 +16,6 @@
         assert log.result == 500
         loop, = log.loops_by_filename(self.filepath)
         assert loop.match_by_id("loadglobal", """
+            p1 = getfield_gc_r(..., descr=...)     # dead
             guard_not_invalidated(descr=...)
         """)
diff --git a/pypy/module/pypyjit/test_pypy_c/test_shift.py b/pypy/module/pypyjit/test_pypy_c/test_shift.py
--- a/pypy/module/pypyjit/test_pypy_c/test_shift.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_shift.py
@@ -196,8 +196,7 @@
         """
         from sys import maxint
 
-        def main(a, b, c):
-            from sys import maxint
+        def main(a, b, c, maxint):
             i = sa = 0
             while i < 300:
                 if 0 < a < 10: pass
@@ -215,4 +214,4 @@
         for a in (1, 4, 8, 100):
             for b in (-10, 10, -201, 201, -maxint/3, maxint/3):
                 for c in (-10, 10, -maxint/3, maxint/3):
-                    yield self.run_and_check, main, [a, b, c]
+                    yield self.run_and_check, main, [a, b, c, maxint]


More information about the pypy-commit mailing list