Commits

Anonymous committed bc0dd18

Also check for a TypeError in test_crasher for struct tests

Comments (0)

Files changed (1)

lib-python/3/test/test_struct.py

 
     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)