Fix warnings in tests.

This commit is contained in:
INADA Naoki 2012-09-24 02:20:53 +09:00
parent 60df5eadaf
commit c2a2d417f1
3 changed files with 14 additions and 15 deletions

View file

@ -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()