summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2014-03-26 12:50:28 +0900
committerINADA Naoki <inada-n@klab.com>2014-03-26 12:50:28 +0900
commit7d0e145e91700ee58c5accaeb5dff6a9ec39a18d (patch)
treefd93bccf35db1c4ce6085c0e7bbe7dcb1cd4997a
parentef5d93d4eaaaf107094776c215f07efd0faae3e9 (diff)
downloadmsgpack-python-7d0e145e91700ee58c5accaeb5dff6a9ec39a18d.tar.gz
Allow ValueError for packing integer overs format limit.
-rw-r--r--test/test_limits.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_limits.py b/test/test_limits.py
index 5d285e7..413d651 100644
--- a/test/test_limits.py
+++ b/test/test_limits.py
@@ -8,12 +8,12 @@ from msgpack import packb, unpackb, Packer
def test_integer():
x = -(2 ** 63)
assert unpackb(packb(x)) == x
- with pytest.raises(OverflowError):
+ with pytest.raises((OverflowError, ValueError)):
packb(x-1)
x = 2 ** 64 - 1
assert unpackb(packb(x)) == x
- with pytest.raises(OverflowError):
+ with pytest.raises((OverflowError, ValueError)):
packb(x+1)