[pypy-commit] pypy py3.5: Fix the last test in test_marshal

arigo pypy.commits at gmail.com
Fri Sep 22 09:20:24 EDT 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r92439:ea46b2e0a190
Date: 2017-09-22 15:20 +0200
http://bitbucket.org/pypy/pypy/changeset/ea46b2e0a190/

Log:	Fix the last test in test_marshal

diff --git a/lib-python/3/test/test_marshal.py b/lib-python/3/test/test_marshal.py
--- a/lib-python/3/test/test_marshal.py
+++ b/lib-python/3/test/test_marshal.py
@@ -271,6 +271,11 @@
                 if n is not None and n > 4:
                     n += 10**6
                 return n
+            def read(self, n):   # PyPy calls read(), not readinto()
+                result = super().read(n)
+                if len(result) > 4:
+                    result += b'\x00' * (10**6)
+                return result
         for value in (1.0, 1j, b'0123456789', '0123456789'):
             self.assertRaises(ValueError, marshal.load,
                               BadReader(marshal.dumps(value)))


More information about the pypy-commit mailing list