diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-07-09 13:20:40 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-07-09 13:20:40 (GMT) |
commit | ccbcf53865146e7e00f48e3712195ea154ed76fe (patch) | |
tree | 8894e83f8f4b71deb4b9a0c8e58fd81e37179af7 /Lib/test | |
parent | 893766cd0b660a1204c53531ecf9879f9075e211 (diff) | |
download | cpython-ccbcf53865146e7e00f48e3712195ea154ed76fe.zip cpython-ccbcf53865146e7e00f48e3712195ea154ed76fe.tar.gz cpython-ccbcf53865146e7e00f48e3712195ea154ed76fe.tar.bz2 |
OverflowError is fine
Diffstat (limited to 'Lib/test')
-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 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 |