diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-01-11 17:02:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 17:02:41 +0900 |
commit | 5534d0c7af0114db3d27f7b96c82a7fe22ce1e40 (patch) | |
tree | 57d598860b021b723074504bd84391852b376eb9 /test/test_unpack.py | |
parent | 50ea49c86f5aaff8bb1cd37778b50b13df83ba8f (diff) | |
download | msgpack-python-5534d0c7af0114db3d27f7b96c82a7fe22ce1e40.tar.gz |
Add raw_as_bytes option to Unpacker. (#265)
Diffstat (limited to 'test/test_unpack.py')
-rw-r--r-- | test/test_unpack.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_unpack.py b/test/test_unpack.py index c0d711c..143f999 100644 --- a/test/test_unpack.py +++ b/test/test_unpack.py @@ -47,8 +47,8 @@ def test_unpacker_ext_hook(): class MyUnpacker(Unpacker): def __init__(self): - super(MyUnpacker, self).__init__(ext_hook=self._hook, - encoding='utf-8') + super(MyUnpacker, self).__init__( + ext_hook=self._hook, raw_as_bytes=False) def _hook(self, code, data): if code == 1: @@ -57,11 +57,11 @@ def test_unpacker_ext_hook(): return ExtType(code, data) unpacker = MyUnpacker() - unpacker.feed(packb({'a': 1}, encoding='utf-8')) + unpacker.feed(packb({'a': 1})) assert unpacker.unpack() == {'a': 1} - unpacker.feed(packb({'a': ExtType(1, b'123')}, encoding='utf-8')) + unpacker.feed(packb({'a': ExtType(1, b'123')})) assert unpacker.unpack() == {'a': 123} - unpacker.feed(packb({'a': ExtType(2, b'321')}, encoding='utf-8')) + unpacker.feed(packb({'a': ExtType(2, b'321')})) assert unpacker.unpack() == {'a': ExtType(2, b'321')} |