[pypy-commit] pypy py3k: PyPy raises TypeError instead of ValueError here.

Manuel Jacob noreply at buildbot.pypy.org
Fri Mar 1 18:07:46 CET 2013


Author: Manuel Jacob
Branch: py3k
Changeset: r61896:9f1bcd8fadc8
Date: 2013-03-01 13:46 +0100
http://bitbucket.org/pypy/pypy/changeset/9f1bcd8fadc8/

Log:	PyPy raises TypeError instead of ValueError here.

diff --git a/lib-python/3.2/test/test_memoryview.py b/lib-python/3.2/test/test_memoryview.py
--- a/lib-python/3.2/test/test_memoryview.py
+++ b/lib-python/3.2/test/test_memoryview.py
@@ -109,8 +109,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