OverflowError is fine

This commit is contained in:
Benjamin Peterson 2010-07-09 13:20:40 +00:00
parent 893766cd0b
commit ccbcf53865
1 changed files with 2 additions and 1 deletions

View File

@ -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