mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-04-13 06:20:19 +00:00
Use new msgpack spec by default. (#386)
This commit is contained in:
parent
de320488ae
commit
7e9905bdfa
11 changed files with 75 additions and 126 deletions
|
|
@ -4,8 +4,8 @@
|
|||
from msgpack import unpackb
|
||||
|
||||
|
||||
def check(src, should, use_list=0):
|
||||
assert unpackb(src, use_list=use_list) == should
|
||||
def check(src, should, use_list=0, raw=True):
|
||||
assert unpackb(src, use_list=use_list, raw=raw) == should
|
||||
|
||||
|
||||
def testSimpleValue():
|
||||
|
|
@ -59,6 +59,12 @@ def testRaw():
|
|||
b"\x00\x00\xdb\x00\x00\x00\x01a\xdb\x00\x00\x00\x02ab",
|
||||
(b"", b"a", b"ab", b"", b"a", b"ab"),
|
||||
)
|
||||
check(
|
||||
b"\x96\xda\x00\x00\xda\x00\x01a\xda\x00\x02ab\xdb\x00\x00"
|
||||
b"\x00\x00\xdb\x00\x00\x00\x01a\xdb\x00\x00\x00\x02ab",
|
||||
("", "a", "ab", "", "a", "ab"),
|
||||
raw=False,
|
||||
)
|
||||
|
||||
|
||||
def testArray():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue