Author: Jason Chu <[email protected]>
Branch: py3k-struct
Changeset: r62520:bc0dd18d6b57
Date: 2013-03-19 16:24 -0700
http://bitbucket.org/pypy/pypy/changeset/bc0dd18d6b57/

Log:    Also check for a TypeError in test_crasher for struct tests

diff --git a/lib-python/3/test/test_struct.py b/lib-python/3/test/test_struct.py
--- a/lib-python/3/test/test_struct.py
+++ b/lib-python/3/test/test_struct.py
@@ -522,7 +522,8 @@
 
     if IS32BIT:
         def test_crasher(self):
-            self.assertRaises(MemoryError, struct.pack, "357913941b", "a")
+            # Pypy catches the string error instead of calculating the entire 
size
+            self.assertRaises((MemoryError, TypeError), struct.pack, 
"357913941b", "a")
 
     def test_trailing_counter(self):
         store = array.array('b', b' '*100)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to