summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2018-11-09 23:03:07 +0900
committerINADA Naoki <songofacandy@gmail.com>2018-11-09 23:03:07 +0900
commite02f9f2593ec3b48aa49a88bacbc23a1dcacc873 (patch)
treebfd50ae2a495dd11fbf8e3a3435ff568ae90bd58
parent33e6aef1715722fe13370baf45e2fd6dae2a11de (diff)
downloadmsgpack-python-exceptions.tar.gz
Remove deprecated errors from testsexceptions
-rw-r--r--test/test_limits.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/test_limits.py b/test/test_limits.py
index 74e48c1..2610e42 100644
--- a/test/test_limits.py
+++ b/test/test_limits.py
@@ -5,33 +5,32 @@ import pytest
from msgpack import (
packb, unpackb, Packer, Unpacker, ExtType,
- PackOverflowError, PackValueError, UnpackValueError,
)
def test_integer():
x = -(2 ** 63)
assert unpackb(packb(x)) == x
- with pytest.raises(PackOverflowError):
+ with pytest.raises(OverflowError):
packb(x-1)
x = 2 ** 64 - 1
assert unpackb(packb(x)) == x
- with pytest.raises(PackOverflowError):
+ with pytest.raises(OverflowError):
packb(x+1)
def test_array_header():
packer = Packer()
packer.pack_array_header(2**32-1)
- with pytest.raises(PackValueError):
+ with pytest.raises(ValueError):
packer.pack_array_header(2**32)
def test_map_header():
packer = Packer()
packer.pack_map_header(2**32-1)
- with pytest.raises(PackValueError):
+ with pytest.raises(ValueError):
packer.pack_array_header(2**32)
@@ -44,7 +43,7 @@ def test_max_str_len():
assert unpacker.unpack() == d
unpacker = Unpacker(max_str_len=2, raw=False)
- with pytest.raises(UnpackValueError):
+ with pytest.raises(ValueError):
unpacker.feed(packed)
unpacker.unpack()
@@ -58,7 +57,7 @@ def test_max_bin_len():
assert unpacker.unpack() == d
unpacker = Unpacker(max_bin_len=2)
- with pytest.raises(UnpackValueError):
+ with pytest.raises(ValueError):
unpacker.feed(packed)
unpacker.unpack()
@@ -72,7 +71,7 @@ def test_max_array_len():
assert unpacker.unpack() == d
unpacker = Unpacker(max_array_len=2)
- with pytest.raises(UnpackValueError):
+ with pytest.raises(ValueError):
unpacker.feed(packed)
unpacker.unpack()
@@ -86,7 +85,7 @@ def test_max_map_len():
assert unpacker.unpack() == d
unpacker = Unpacker(max_map_len=2)
- with pytest.raises(UnpackValueError):
+ with pytest.raises(ValueError):
unpacker.feed(packed)
unpacker.unpack()
@@ -100,7 +99,7 @@ def test_max_ext_len():
assert unpacker.unpack() == d
unpacker = Unpacker(max_ext_len=2)
- with pytest.raises(UnpackValueError):
+ with pytest.raises(ValueError):
unpacker.feed(packed)
unpacker.unpack()