]> granicus.if.org Git - python/commitdiff
ValueError is eventually what we want to move to, I suppose
authorBenjamin Peterson <benjamin@python.org>
Sat, 10 Jul 2010 15:14:45 +0000 (15:14 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 10 Jul 2010 15:14:45 +0000 (15:14 +0000)
Lib/test/test_struct.py

index 7cde5903af583882dad1117b556604a523801da1..d3840cc9962c6cdd9271dcce6867a6ec0aa01183 100644 (file)
@@ -234,8 +234,8 @@ class StructTest(unittest.TestCase):
                                                                  b'\x01' + got)
                 else:
                     # x is out of range -- verify pack realizes that.
-                    self.assertRaises((OverflowError, struct.error), pack,
-                                      format, x)
+                    self.assertRaises((OverflowError, ValueError, struct.error),
+                                      pack, format, x)
 
             def run(self):
                 from random import randrange