mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Added support of bytearrays to msgpack/fallback.py
This commit is contained in:
parent
d5436c2819
commit
48ca2d700d
2 changed files with 9 additions and 0 deletions
|
@ -11,3 +11,10 @@ def test_unpack_buffer():
|
|||
obj = unpackb(buf, use_list=1)
|
||||
assert [b'foo', b'bar'] == obj
|
||||
|
||||
|
||||
def test_unpack_bytearray():
|
||||
buf = bytearray(packb(('foo', 'bar')))
|
||||
obj = unpackb(buf, use_list=1)
|
||||
assert [b'foo', b'bar'] == obj
|
||||
assert all(type(s)==str for s in obj)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue