From ccbcf53865146e7e00f48e3712195ea154ed76fe Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Jul 2010 13:20:40 +0000 Subject: OverflowError is fine --- Lib/test/test_struct.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index ecf38ba..23ec29a 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 -- cgit v0.12