diff options
author | Naoki INADA <omoikane@sourceforge.jp> | 2009-12-17 17:58:41 +0900 |
---|---|---|
committer | Naoki INADA <omoikane@sourceforge.jp> | 2009-12-17 17:58:41 +0900 |
commit | 472f5be977e913632cc1d15e663a34b62dfbab5c (patch) | |
tree | d388e0148a810e0f9cda6ef9db00985d6f572e9d /test/test_case.py | |
parent | 8194212d5845d648cc35b677c71db61ceb2d11d3 (diff) | |
download | msgpack-python-472f5be977e913632cc1d15e663a34b62dfbab5c.tar.gz |
Fix tests.
Diffstat (limited to 'test/test_case.py')
-rw-r--r-- | test/test_case.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_case.py b/test/test_case.py index d754fb0..a08c6ce 100644 --- a/test/test_case.py +++ b/test/test_case.py @@ -5,6 +5,7 @@ from nose import main from nose.tools import * from msgpack import packs, unpacks + def check(length, obj): v = packs(obj) assert_equal(len(v), length, "%r length should be %r but get %r" % (obj, length, len(v))) @@ -54,7 +55,7 @@ def test_raw32(): def check_array(overhead, num): - check(num + overhead, [None] * num) + check(num + overhead, (None,) * num) def test_fixarray(): check_array(1, 0) @@ -86,9 +87,9 @@ def test_match(): (-129, '\xd1\xff\x7f'), ({1:1}, '\x81\x01\x01'), (1.0, "\xcb\x3f\xf0\x00\x00\x00\x00\x00\x00"), - ([], '\x90'), - (range(15),"\x9f\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e"), - (range(16),"\xdc\x00\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"), + ((), '\x90'), + (tuple(range(15)),"\x9f\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e"), + (tuple(range(16)),"\xdc\x00\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"), ({}, '\x80'), (dict([(x,x) for x in range(15)]), '\x8f\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\x05\x05\x06\x06\x07\x07\x08\x08\t\t\n\n\x0b\x0b\x0c\x0c\r\r\x0e\x0e'), (dict([(x,x) for x in range(16)]), '\xde\x00\x10\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\x05\x05\x06\x06\x07\x07\x08\x08\t\t\n\n\x0b\x0b\x0c\x0c\r\r\x0e\x0e\x0f\x0f'), |