8000 Allow ValueError for packing integer overs format limit. · imclab/msgpack-python@7d0e145 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d0e145

Browse files
committed
Allow ValueError for packing integer overs format limit.
1 parent ef5d93d commit 7d0e145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_limits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
def test_integer():
99
x = -(2 ** 63)
1010
assert unpackb(packb(x)) == x
11-
with pytest.raises(OverflowError):
11+
with pytest.raises((OverflowError, ValueError)):
1212
packb(x-1)
1313

1414
x = 2 ** 64 - 1
1515
assert unpackb(packb(x)) == x
16-
with pytest.raises(OverflowError):
16+
with pytest.raises((OverflowError, ValueError)):
1717
packb(x+1)
1818

1919

0 commit comments

Comments
 (0)
0