diff options
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index ecf38ba28b..23ec29afdd 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -234,7 +234,8 @@ class StructTest(unittest.TestCase): b'\x01' + got) else: # x is out of range -- verify pack realizes that. - self.assertRaises(struct.error, pack, format, x) + self.assertRaises((OverflowError, struct.error), pack, + format, x) def run(self): from random import randrange |