blob: ce7a72d238b3b41e6c72ddcaf0d25b3043f5a99f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env python
# coding: utf-8
from nose import main
from nose.tools import *
from msgpack import packb, unpackb
def test_unpack_buffer():
from array import array
buf = array('c')
buf.fromstring(packb(('foo', 'bar')))
obj = unpackb(buf)
assert_equal(('foo', 'bar'), obj)
if __name__ == '__main__':
main()
|