summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test_buffer.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_buffer.py b/test/test_buffer.py
new file mode 100644
index 0000000..436b554
--- /dev/null
+++ b/test/test_buffer.py
@@ -0,0 +1,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()