Use new msgpack spec by default. (#386)

This commit is contained in:
Inada Naoki 2019-12-05 21:34:10 +09:00 committed by GitHub
parent de320488ae
commit 7e9905bdfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 75 additions and 126 deletions

View file

@ -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():