diff options
author | INADA Naoki <inada-n@klab.com> | 2014-03-26 12:50:28 +0900 |
---|---|---|
committer | INADA Naoki <inada-n@klab.com> | 2014-03-26 12:50:28 +0900 |
commit | 7d0e145e91700ee58c5accaeb5dff6a9ec39a18d (patch) | |
tree | fd93bccf35db1c4ce6085c0e7bbe7dcb1cd4997a | |
parent | ef5d93d4eaaaf107094776c215f07efd0faae3e9 (diff) | |
download | msgpack-python-7d0e145e91700ee58c5accaeb5dff6a9ec39a18d.tar.gz |
Allow ValueError for packing integer overs format limit.
-rw-r--r-- | test/test_limits.py | 4 |
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) |