mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-24 14:23:19 +00:00
Fix test
This commit is contained in:
parent
e76091a82c
commit
ab789813b8
1 changed files with 2 additions and 2 deletions
|
|
@ -55,9 +55,9 @@ def test_invalidvalue():
|
||||||
def test_strict_map_key():
|
def test_strict_map_key():
|
||||||
valid = {u"unicode": 1, b"bytes": 2}
|
valid = {u"unicode": 1, b"bytes": 2}
|
||||||
packed = packb(valid, use_bin_type=True)
|
packed = packb(valid, use_bin_type=True)
|
||||||
assert valid == unpackb(packed, raw=True, strict_map_key=True)
|
assert valid == unpackb(packed, raw=False, strict_map_key=True)
|
||||||
|
|
||||||
invalid = {42: 1}
|
invalid = {42: 1}
|
||||||
packed = packb(invalid, use_bin_type=True)
|
packed = packb(invalid, use_bin_type=True)
|
||||||
with raises(ValueError):
|
with raises(ValueError):
|
||||||
unpackb(packed, raw=True, strict_map_key=True)
|
unpackb(packed, raw=False, strict_map_key=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue