File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ It is also possible to pack/unpack custom data types. Here is an example for
148
148
``object_pairs_hook `` callback may instead be used to receive a list of
149
149
key-value pairs.
150
150
151
+
151
152
Extended types
152
153
^^^^^^^^^^^^^^
153
154
@@ -170,7 +171,7 @@ It is also possible to pack/unpack custom data types using the **ext** type.
170
171
... return ExtType(code, data)
171
172
...
172
173
>>> data = array.array('d', [1.2, 3.4])
173
- >>> packed = msgpack.packb(data, default=default)
174
+ >>> packed = msgpack.packb(data, default=default, use_bin_type=True )
174
175
>>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook)
175
176
>>> data == unpacked
176
177
True
294
295
MessagePack uses `pytest ` for testing.
295
296
Run test with following command:
296
297
297
- $ py. test
298
+ $ pytest -v test
298
299
299
300
300
301
..
You can’t perform that action at this time.
0 commit comments