diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index 816cedbb11d..5a63135a1a3 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -243,8 +243,8 @@ class StructTest(unittest.TestCase): '\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