mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 04:13:16 +00:00
13 lines
230 B
Python
13 lines
230 B
Python
![]() |
#!/usr/bin/env python
|
||
|
# coding: utf-8
|
||
|
|
||
|
|
||
|
from msgpack import packb, unpackb
|
||
|
|
||
|
|
||
|
def test_pack_memoryview():
|
||
|
data = bytearray(range(256))
|
||
|
view = memoryview(data)
|
||
|
unpacked = unpackb(packb(view))
|
||
|
assert data == unpacked
|