mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-01 18:10:54 +00:00
implement Packer.pack_extended_type also in the cython version of the code
This commit is contained in:
parent
afa28fb205
commit
5467515065
4 changed files with 69 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ def test_pack_extended_type():
|
|||
def p(s):
|
||||
packer = msgpack.Packer()
|
||||
packer.pack_extended_type(0x42, s)
|
||||
return packer._buffer.getvalue()
|
||||
return packer.bytes()
|
||||
assert p('A') == '\xd4\x42A' # fixext 1
|
||||
assert p('AB') == '\xd5\x42AB' # fixext 2
|
||||
assert p('ABCD') == '\xd6\x42ABCD' # fixext 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue