summaryrefslogtreecommitdiff
path: root/test/test_case.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_case.py')
-rw-r--r--test/test_case.py9
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'),