[pypy-commit] pypy stdlib-3.2.5: another BufferError impl. detail

pjenvey noreply at buildbot.pypy.org
Thu Apr 10 00:16:56 CEST 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: stdlib-3.2.5
Changeset: r70524:e7aa6d7e4488
Date: 2014-04-09 15:04 -0700
http://bitbucket.org/pypy/pypy/changeset/e7aa6d7e4488/

Log:	another BufferError impl. detail

diff --git a/lib-python/3/test/test_re.py b/lib-python/3/test/test_re.py
--- a/lib-python/3/test/test_re.py
+++ b/lib-python/3/test/test_re.py
@@ -1,5 +1,5 @@
 from test.support import verbose, run_unittest, gc_collect, bigmemtest, _2G, \
-        cpython_only
+        cpython_only, check_impl_detail
 import io
 import re
 from re import Scanner
@@ -25,7 +25,12 @@
         # See bug 14212
         b = bytearray(b'x')
         it = re.finditer(b'a', b)
-        with self.assertRaises(BufferError):
+        if check_impl_detail(pypy=False):
+            # PyPy export buffers differently, and allows reallocation
+            # of the underlying object.
+            with self.assertRaises(BufferError):
+                b.extend(b'x'*400)
+        else:
             b.extend(b'x'*400)
         list(it)
         del it


More information about the pypy-commit mailing list