mirror of
https://github.com/python/cpython.git
synced 2025-09-22 00:12:56 +00:00
OverflowError is fine
This commit is contained in:
parent
893766cd0b
commit
ccbcf53865
1 changed files with 2 additions and 1 deletions
|
@ -234,7 +234,8 @@ class StructTest(unittest.TestCase):
|
||||||
b'\x01' + got)
|
b'\x01' + got)
|
||||||
else:
|
else:
|
||||||
# x is out of range -- verify pack realizes that.
|
# 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):
|
def run(self):
|
||||||
from random import randrange
|
from random import randrange
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue