mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
unify tests for py2 and py3
This commit is contained in:
parent
76f34667a0
commit
0b38e86534
14 changed files with 85 additions and 462 deletions
|
@ -7,10 +7,10 @@ from msgpack import packb, unpackb
|
|||
|
||||
def test_unpack_buffer():
|
||||
from array import array
|
||||
buf = array('c')
|
||||
buf = array('b')
|
||||
buf.fromstring(packb(('foo', 'bar')))
|
||||
obj = unpackb(buf)
|
||||
assert_equal(('foo', 'bar'), obj)
|
||||
assert_equal((b'foo', b'bar'), obj)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue