Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r88131:8b664111697d
Date: 2016-11-03 19:06 +0100
http://bitbucket.org/pypy/pypy/changeset/8b664111697d/

Log:    fix test

diff --git a/lib-python/3/test/test_bytes.py b/lib-python/3/test/test_bytes.py
--- a/lib-python/3/test/test_bytes.py
+++ b/lib-python/3/test/test_bytes.py
@@ -1006,9 +1006,13 @@
     def test_del_expand(self):
         # Reducing the size should not expand the buffer (issue #23985)
         b = bytearray(10)
-        size = sys.getsizeof(b)
-        del b[:1]
-        self.assertLessEqual(sys.getsizeof(b), size)
+        try:
+            size = sys.getsizeof(b)
+        except TypeError:
+            pass            # e.g. on pypy
+        else:
+            del b[:1]
+            self.assertLessEqual(sys.getsizeof(b), size)
 
     def test_extended_set_del_slice(self):
         indices = (0, None, 1, 3, 19, 300, 1<<333, -1, -2, -31, -300)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to