unify tests for py2 and py3

This commit is contained in:
INADA Naoki 2012-06-19 13:55:14 +09:00
parent 76f34667a0
commit 0b38e86534
14 changed files with 85 additions and 462 deletions

View file

@ -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()