mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 04:13:16 +00:00
Fix warnings in tests.
This commit is contained in:
parent
60df5eadaf
commit
c2a2d417f1
3 changed files with 14 additions and 15 deletions
|
@ -9,7 +9,7 @@ from msgpack import packb, unpackb
|
|||
def check(length, obj):
|
||||
v = packb(obj)
|
||||
assert_equal(len(v), length, "%r length should be %r but get %r" % (obj, length, len(v)))
|
||||
assert_equal(unpackb(v), obj)
|
||||
assert_equal(unpackb(v, use_list=0), obj)
|
||||
|
||||
def test_1():
|
||||
for o in [None, True, False, 0, 1, (1 << 6), (1 << 7) - 1, -1,
|
||||
|
@ -71,7 +71,7 @@ def test_array32():
|
|||
|
||||
def match(obj, buf):
|
||||
assert_equal(packb(obj), buf)
|
||||
assert_equal(unpackb(buf), obj)
|
||||
assert_equal(unpackb(buf, use_list=0), obj)
|
||||
|
||||
def test_match():
|
||||
cases = [
|
||||
|
@ -99,7 +99,7 @@ def test_match():
|
|||
match(v, p)
|
||||
|
||||
def test_unicode():
|
||||
assert_equal(b'foobar', unpackb(packb('foobar')))
|
||||
assert_equal(b'foobar', unpackb(packb('foobar'), use_list=1))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue