summaryrefslogtreecommitdiff
path: root/test/test_buffer.py
blob: 436b554fa4e7e487aa8ce30f0ad6e5fb6e7792e7 (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('b')
    buf.fromstring(packb(['foo', 'bar']))
    obj = unpackb(buf)
    assert_equal(['foo', 'bar'], obj)

if __name__ == '__main__':
    main()