diff options
author | INADA Naoki <inada-n@klab.com> | 2014-02-17 04:06:58 +0900 |
---|---|---|
committer | INADA Naoki <inada-n@klab.com> | 2014-02-17 04:06:58 +0900 |
commit | 518f886b111808d7d9f29b34c50baddb01610338 (patch) | |
tree | 883de44615a4fede80d73f53852da71988411108 | |
parent | 7effb4aac64f1c44241e0a88ab19fa6c8405c3fa (diff) | |
download | msgpack-python-518f886b111808d7d9f29b34c50baddb01610338.tar.gz |
fix
-rw-r--r-- | test/test_buffer.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_buffer.py b/test/test_buffer.py index 7b85e93..6cb2295 100644 --- a/test/test_buffer.py +++ b/test/test_buffer.py @@ -8,7 +8,7 @@ import sys def test_unpack_buffer(): from array import array buf = array('b') - buf.fromstring(packb(('foo', 'bar'))) + buf.fromstring(packb((b'foo', b'bar'))) obj = unpackb(buf, use_list=1) assert [b'foo', b'bar'] == obj @@ -17,7 +17,5 @@ def test_unpack_bytearray(): buf = bytearray(packb(('foo', 'bar'))) obj = unpackb(buf, use_list=1) assert [b'foo', b'bar'] == obj - expected_type = bytes if sys.version_info[0] == 3 else str - assert all(type(s)==expected_type for s in obj) - - + expected_type = bytes + assert all(type(s) == expected_type for s in obj) |