[pypy-svn] pypy default: a TypeError is probably right here (buffer.setitem raises this)

amauryfa commits-noreply at bitbucket.org
Thu Jan 27 19:27:39 CET 2011

Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Changeset: r41408:b8f02fbca77d
Date: 2011-01-27 19:13 +0100

Log:	a TypeError is probably right here (buffer.setitem raises this)

diff --git a/lib-python/modified-2.7.0/test/test_memoryview.py b/lib-python/modified-2.7.0/test/test_memoryview.py
--- a/lib-python/modified-2.7.0/test/test_memoryview.py
+++ b/lib-python/modified-2.7.0/test/test_memoryview.py
@@ -114,8 +114,8 @@
         self.assertRaises(TypeError, setitem, (0,), b"a")
         self.assertRaises(TypeError, setitem, "a", b"a")
         # Trying to resize the memory object
-        self.assertRaises(ValueError, setitem, 0, b"")
-        self.assertRaises(ValueError, setitem, 0, b"ab")
+        self.assertRaises((ValueError, TypeError), setitem, 0, b"")
+        self.assertRaises((ValueError, TypeError), setitem, 0, b"ab")
         self.assertRaises(ValueError, setitem, slice(1,1), b"a")
         self.assertRaises(ValueError, setitem, slice(0,2), b"a")

More information about the Pypy-commit mailing list