mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 12:23:16 +00:00
Remove pytest warnings
This commit is contained in:
parent
28b5f46a34
commit
464fe277e1
3 changed files with 27 additions and 11 deletions
|
@ -7,7 +7,10 @@ from msgpack import packb, unpackb
|
|||
def test_unpack_buffer():
|
||||
from array import array
|
||||
buf = array('b')
|
||||
buf.fromstring(packb((b'foo', b'bar')))
|
||||
try:
|
||||
buf.frombytes(packb((b'foo', b'bar')))
|
||||
except AttributeError: # PY2
|
||||
buf.fromstring(packb((b'foo', b'bar')))
|
||||
obj = unpackb(buf, use_list=1)
|
||||
assert [b'foo', b'bar'] == obj
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue