diff options
Diffstat (limited to 'test/test_sequnpack.py')
-rw-r--r-- | test/test_sequnpack.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_sequnpack.py b/test/test_sequnpack.py index 9b69479..ad29de8 100644 --- a/test/test_sequnpack.py +++ b/test/test_sequnpack.py @@ -93,6 +93,15 @@ def test_readbytes(): assert unpacker.unpack() == ord(b"a") assert unpacker.unpack() == ord(b"r") + # Issue 352 + u = Unpacker() + u.feed(b"x") + assert bytes(u.read_bytes(1)) == b"x" + with raises(StopIteration): + next(u) + u.feed(b"\1") + assert next(u) == 1 + def test_issue124(): unpacker = Unpacker() |