瀏覽代碼

Update 723_msgpack.py

blueloveTH 3 月之前
父節點
當前提交
338547dc8d
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      tests/723_msgpack.py

+ 2 - 5
tests/723_msgpack.py

@@ -65,11 +65,8 @@ assert msgpack.dumps([]) == b'\x90'
 assert msgpack.dumps([1, 2, 3]) == b'\x93\x01\x02\x03'
 assert msgpack.dumps([1, 2, 3]) == b'\x93\x01\x02\x03'
 assert msgpack.dumps([1]) == b'\x91\x01'
 assert msgpack.dumps([1]) == b'\x91\x01'
 
 
-try:
-    msgpack.dumps({1: 2})
-    assert False
-except TypeError:
-    assert True
+_o = msgpack.dumps({1: 2})
+assert msgpack.loads(_o) == {1: 2}
 
 
 try:
 try:
     msgpack.dumps(type)
     msgpack.dumps(type)