mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Update setuptools and black (#498)
* Use setuptools * Use black==22.1.0
This commit is contained in:
parent
89ea57747e
commit
cb50b2081b
13 changed files with 83 additions and 84 deletions
|
@ -16,12 +16,12 @@ from msgpack import (
|
|||
|
||||
|
||||
def test_integer():
|
||||
x = -(2 ** 63)
|
||||
x = -(2**63)
|
||||
assert unpackb(packb(x)) == x
|
||||
with pytest.raises(PackOverflowError):
|
||||
packb(x - 1)
|
||||
|
||||
x = 2 ** 64 - 1
|
||||
x = 2**64 - 1
|
||||
assert unpackb(packb(x)) == x
|
||||
with pytest.raises(PackOverflowError):
|
||||
packb(x + 1)
|
||||
|
@ -29,16 +29,16 @@ def test_integer():
|
|||
|
||||
def test_array_header():
|
||||
packer = Packer()
|
||||
packer.pack_array_header(2 ** 32 - 1)
|
||||
packer.pack_array_header(2**32 - 1)
|
||||
with pytest.raises(PackValueError):
|
||||
packer.pack_array_header(2 ** 32)
|
||||
packer.pack_array_header(2**32)
|
||||
|
||||
|
||||
def test_map_header():
|
||||
packer = Packer()
|
||||
packer.pack_map_header(2 ** 32 - 1)
|
||||
packer.pack_map_header(2**32 - 1)
|
||||
with pytest.raises(PackValueError):
|
||||
packer.pack_array_header(2 ** 32)
|
||||
packer.pack_array_header(2**32)
|
||||
|
||||
|
||||
def test_max_str_len():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue