From: Benjamin Peterson Date: Fri, 9 Jul 2010 13:20:40 +0000 (+0000) Subject: OverflowError is fine X-Git-Tag: v3.2a1~260 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccbcf53865146e7e00f48e3712195ea154ed76fe;p=python OverflowError is fine --- 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