Skip to content

Commit

Permalink
Add test for #526
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jan 18, 2023
1 parent c399566 commit 9a9e789
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_memoryview.py
Expand Up @@ -96,3 +96,11 @@ def test_bin32_from_byte():

def test_bin32_from_float():
_runtest("f", 2**16, b"\xc6", b"\x00\x01\x00\x00", True)


def test_multidim_memoryview():
# See https://github.com/msgpack/msgpack-python/issues/526
view = memoryview(b"\00" * 6)
data = view.cast(view.format, (3, 2))
packed = packb(data)
assert packed == b'\xc4\x06\x00\x00\x00\x00\x00\x00'

0 comments on commit 9a9e789

Please sign in to comment.