mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-08 21:41:01 +00:00
Add test for issue #124
This commit is contained in:
parent
68b0294465
commit
83404945c0
1 changed files with 12 additions and 0 deletions
|
|
@ -84,3 +84,15 @@ def test_readbytes():
|
|||
assert unpacker.read_bytes(3) == b'oob'
|
||||
assert unpacker.unpack() == ord(b'a')
|
||||
assert unpacker.unpack() == ord(b'r')
|
||||
|
||||
def test_issue124():
|
||||
unpacker = Unpacker()
|
||||
unpacker.feed('\xa1?\xa1!')
|
||||
assert tuple(unpacker) == ('?', '!')
|
||||
assert tuple(unpacker) == ()
|
||||
unpacker.feed("\xa1?\xa1")
|
||||
assert tuple(unpacker) == ('?',)
|
||||
assert tuple(unpacker) == ()
|
||||
unpacker.feed("!")
|
||||
assert tuple(unpacker) == ('!',)
|
||||
assert tuple(unpacker) == ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue