summaryrefslogtreecommitdiff
path: root/test/test_stricttype.py
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-01-11 17:02:41 +0900
committerGitHub <noreply@github.com>2018-01-11 17:02:41 +0900
commit5534d0c7af0114db3d27f7b96c82a7fe22ce1e40 (patch)
tree57d598860b021b723074504bd84391852b376eb9 /test/test_stricttype.py
parent50ea49c86f5aaff8bb1cd37778b50b13df83ba8f (diff)
downloadmsgpack-python-5534d0c7af0114db3d27f7b96c82a7fe22ce1e40.tar.gz
Add raw_as_bytes option to Unpacker. (#265)
Diffstat (limited to 'test/test_stricttype.py')
-rw-r--r--test/test_stricttype.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_stricttype.py b/test/test_stricttype.py
index 0f865c8..13239f1 100644
--- a/test/test_stricttype.py
+++ b/test/test_stricttype.py
@@ -11,7 +11,7 @@ def test_namedtuple():
return dict(o._asdict())
raise TypeError('Unsupported type %s' % (type(o),))
packed = packb(T(1, 42), strict_types=True, use_bin_type=True, default=default)
- unpacked = unpackb(packed, encoding='utf-8')
+ unpacked = unpackb(packed, raw_as_bytes=False)
assert unpacked == {'foo': 1, 'bar': 42}
@@ -32,7 +32,7 @@ def test_tuple():
return o
data = packb(t, strict_types=True, use_bin_type=True, default=default)
- expected = unpackb(data, encoding='utf-8', object_hook=convert)
+ expected = unpackb(data, raw_as_bytes=False, object_hook=convert)
assert expected == t
@@ -53,10 +53,10 @@ def test_tuple_ext():
def convert(code, payload):
if code == MSGPACK_EXT_TYPE_TUPLE:
# Unpack and convert to tuple
- return tuple(unpackb(payload, encoding='utf-8', ext_hook=convert))
+ return tuple(unpackb(payload, raw_as_bytes=False, ext_hook=convert))
raise ValueError('Unknown Ext code {}'.format(code))
data = packb(t, strict_types=True, use_bin_type=True, default=default)
- expected = unpackb(data, encoding='utf-8', ext_hook=convert)
+ expected = unpackb(data, raw_as_bytes=False, ext_hook=convert)
assert expected == t