mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-13 19:04:16 +00:00
Split exceptions.
This commit is contained in:
parent
dd5c76b955
commit
219d47503c
4 changed files with 45 additions and 13 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
import six
|
||||
from msgpack import Unpacker, BufferFull
|
||||
from msgpack.exceptions import OutOfData
|
||||
import nose
|
||||
|
||||
def test_foobar():
|
||||
|
|
@ -17,7 +18,7 @@ def test_foobar():
|
|||
try:
|
||||
o = unpacker.unpack()
|
||||
assert 0, "should raise exception"
|
||||
except StopIteration:
|
||||
except OutOfData:
|
||||
assert 1, "ok"
|
||||
|
||||
unpacker.feed(b'foo')
|
||||
|
|
@ -41,7 +42,7 @@ def test_foobar_skip():
|
|||
try:
|
||||
o = unpacker.unpack()
|
||||
assert 0, "should raise exception"
|
||||
except StopIteration:
|
||||
except OutOfData:
|
||||
assert 1, "ok"
|
||||
|
||||
def test_maxbuffersize():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue