From 7d0e145e91700ee58c5accaeb5dff6a9ec39a18d Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Wed, 26 Mar 2014 12:50:28 +0900 Subject: Allow ValueError for packing integer overs format limit. --- test/test_limits.py | 4 ++-- 1 file 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) -- cgit v1.2.1