mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-11 06:51:04 +00:00
Warn when use_list is not specified.
Conflicts: test/test_sequnpack.py
This commit is contained in:
parent
c3da845868
commit
d503788e95
7 changed files with 36 additions and 23 deletions
|
|
@ -5,7 +5,7 @@ from msgpack import Unpacker, BufferFull
|
|||
import nose
|
||||
|
||||
def test_foobar():
|
||||
unpacker = Unpacker(read_size=3)
|
||||
unpacker = Unpacker(read_size=3, use_list=1)
|
||||
unpacker.feed(b'foobar')
|
||||
assert unpacker.unpack() == ord(b'f')
|
||||
assert unpacker.unpack() == ord(b'o')
|
||||
|
|
@ -28,10 +28,9 @@ def test_foobar():
|
|||
k += 1
|
||||
assert k == len(b'foobar')
|
||||
|
||||
|
||||
def test_maxbuffersize():
|
||||
nose.tools.assert_raises(ValueError, Unpacker, read_size=5, max_buffer_size=3)
|
||||
unpacker = Unpacker(read_size=3, max_buffer_size=3)
|
||||
unpacker = Unpacker(read_size=3, max_buffer_size=3, use_list=1)
|
||||
unpacker.feed(b'fo')
|
||||
nose.tools.assert_raises(BufferFull, unpacker.feed, b'ob')
|
||||
unpacker.feed(b'o')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue