mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-04-10 05:20:17 +00:00
move project metadata to pyproject.toml (#555)
also: replace flake8 by ruff.
This commit is contained in:
parent
7b75b4f368
commit
423c6df265
14 changed files with 57 additions and 54 deletions
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import pytest
|
||||
from msgpack import packb, unpackb
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import pytest
|
||||
from array import array
|
||||
from msgpack import packb, unpackb
|
||||
import sys
|
||||
|
||||
|
||||
def make_array(f, data):
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def test_decode_pairs_hook():
|
|||
prod_sum = 1 * 2 + 3 * 4
|
||||
unpacked = unpackb(
|
||||
packed,
|
||||
object_pairs_hook=lambda l: sum(k * v for k, v in l),
|
||||
object_pairs_hook=lambda lst: sum(k * v for k, v in lst),
|
||||
use_list=1,
|
||||
strict_map_key=False,
|
||||
)
|
||||
|
|
@ -48,7 +48,7 @@ def test_only_one_obj_hook():
|
|||
def test_bad_hook():
|
||||
with raises(TypeError):
|
||||
packed = packb([3, 1 + 2j], default=lambda o: o)
|
||||
unpacked = unpackb(packed, use_list=1)
|
||||
unpackb(packed, use_list=1)
|
||||
|
||||
|
||||
def _arr_to_str(arr):
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
from collections import OrderedDict
|
||||
from io import BytesIO
|
||||
import struct
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from pytest import raises, xfail
|
||||
|
||||
from msgpack import packb, unpackb, Unpacker, Packer, pack
|
||||
from msgpack import packb, unpackb, Unpacker, Packer
|
||||
|
||||
|
||||
def check(data, use_list=False):
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ def test_exceeding_unpacker_read_size():
|
|||
|
||||
read_count = 0
|
||||
for idx, o in enumerate(unpacker):
|
||||
assert type(o) == bytes
|
||||
assert isinstance(o, bytes)
|
||||
assert o == gen_binary_data(idx)
|
||||
read_count += 1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from msgpack import packb, unpackb
|
||||
from msgpack import packb
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
import sys
|
||||
import datetime
|
||||
import msgpack
|
||||
from msgpack.ext import Timestamp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue