mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-24 06:13:18 +00:00
Packing ExtType and some cleanup
This commit is contained in:
parent
aa68c9b833
commit
96bcd76f49
7 changed files with 130 additions and 168 deletions
|
|
@ -85,16 +85,3 @@ def test_readbytes():
|
|||
assert unpacker.read_bytes(3) == b'oob'
|
||||
assert unpacker.unpack() == ord(b'a')
|
||||
assert unpacker.unpack() == ord(b'r')
|
||||
|
||||
def test_unpack_one():
|
||||
unpacker = Unpacker()
|
||||
unpacker.feed('\xda\x00\x03abc')
|
||||
assert unpacker.unpack_one() == 'abc'
|
||||
#
|
||||
unpacker = Unpacker()
|
||||
unpacker.feed('\xda\x00\x03abcd')
|
||||
py.test.raises(ExtraData, "unpacker.unpack_one()")
|
||||
#
|
||||
unpacker = Unpacker()
|
||||
unpacker.feed('\xda\x00\x03ab')
|
||||
py.test.raises(UnpackValueError, "unpacker.unpack_one()")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue