Support unpacking new types.

This commit is contained in:
INADA Naoki 2013-10-20 22:59:27 +09:00
parent 96bcd76f49
commit 822cce823c
4 changed files with 17 additions and 11 deletions

View file

@ -35,7 +35,7 @@ def test_only_one_obj_hook():
unpackb(b'', object_hook=lambda x: x, object_pairs_hook=lambda x: x)
def test_bad_hook():
with raises(ValueError):
with raises(TypeError):
packed = packb([3, 1+2j], default=lambda o: o)
unpacked = unpackb(packed, use_list=1)