summaryrefslogtreecommitdiff
path: root/test/test_format.py
diff options
context:
space:
mode:
authorNaoki INADA <omoikane@sourceforge.jp>2009-12-17 17:58:41 +0900
committerNaoki INADA <omoikane@sourceforge.jp>2009-12-17 17:58:41 +0900
commit472f5be977e913632cc1d15e663a34b62dfbab5c (patch)
treed388e0148a810e0f9cda6ef9db00985d6f572e9d /test/test_format.py
parent8194212d5845d648cc35b677c71db61ceb2d11d3 (diff)
downloadmsgpack-python-472f5be977e913632cc1d15e663a34b62dfbab5c.tar.gz
Fix tests.
Diffstat (limited to 'test/test_format.py')
-rw-r--r--test/test_format.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/test_format.py b/test/test_format.py
index 009a764..562ef54 100644
--- a/test/test_format.py
+++ b/test/test_format.py
@@ -10,21 +10,21 @@ def check(src, should):
def testSimpleValue():
check("\x93\xc0\xc2\xc3",
- [None, False, True])
+ (None, False, True,))
def testFixnum():
check("\x92\x93\x00\x40\x7f\x93\xe0\xf0\xff",
- [[0,64,127], [-32,-16,-1]]
+ ((0,64,127,), (-32,-16,-1,),)
)
def testFixArray():
check("\x92\x90\x91\x91\xc0",
- [[],[[None]]],
+ ((),((None,),),),
)
def testFixRaw():
check("\x94\xa0\xa1a\xa2bc\xa3def",
- ["", "a", "bc", "def"],
+ ("", "a", "bc", "def",),
)
def testFixMap():
@@ -38,25 +38,26 @@ def testUnsignedInt():
"\x99\xcc\x00\xcc\x80\xcc\xff\xcd\x00\x00\xcd\x80\x00"
"\xcd\xff\xff\xce\x00\x00\x00\x00\xce\x80\x00\x00\x00"
"\xce\xff\xff\xff\xff",
- [0, 128, 255, 0, 32768, 65535, 0, 2147483648, 4294967295],
+ (0, 128, 255, 0, 32768, 65535, 0, 2147483648, 4294967295,),
)
def testSignedInt():
check("\x99\xd0\x00\xd0\x80\xd0\xff\xd1\x00\x00\xd1\x80\x00"
"\xd1\xff\xff\xd2\x00\x00\x00\x00\xd2\x80\x00\x00\x00"
"\xd2\xff\xff\xff\xff",
- [0, -128, -1, 0, -32768, -1, 0, -2147483648, -1])
+ (0, -128, -1, 0, -32768, -1, 0, -2147483648, -1,))
def testRaw():
check("\x96\xda\x00\x00\xda\x00\x01a\xda\x00\x02ab\xdb\x00\x00"
"\x00\x00\xdb\x00\x00\x00\x01a\xdb\x00\x00\x00\x02ab",
- ["", "a", "ab", "", "a", "ab"])
+ ("", "a", "ab", "", "a", "ab"))
def testArray():
check("\x96\xdc\x00\x00\xdc\x00\x01\xc0\xdc\x00\x02\xc2\xc3\xdd\x00"
"\x00\x00\x00\xdd\x00\x00\x00\x01\xc0\xdd\x00\x00\x00\x02"
"\xc2\xc3",
- [[], [None], [False,True], [], [None], [False,True]])
+ ((), (None,), (False,True), (), (None,), (False,True))
+ )
def testMap():
check(
@@ -67,8 +68,8 @@ def testMap():
"\xdf\x00\x00\x00\x00"
"\xdf\x00\x00\x00\x01\xc0\xc2"
"\xdf\x00\x00\x00\x02\xc0\xc2\xc3\xc2",
- [{}, {None: False}, {True: False, None: False}, {},
- {None: False}, {True: False, None: False}])
+ ({}, {None: False}, {True: False, None: False}, {},
+ {None: False}, {True: False, None: False}))
if __name__ == '__main__':
main()