summaryrefslogtreecommitdiff
path: root/test3/test_obj.py
diff options
context:
space:
mode:
authortailhook <pc@gafol.net>2011-04-15 17:36:17 +0300
committertailhook <pc@gafol.net>2011-04-15 18:39:17 +0300
commit752e3d1b783fc1c12a28e05a93aa73ac7c6b751c (patch)
tree1b22ff0771d1164468253bed6d0fd668e7e49a79 /test3/test_obj.py
parentaf7113bb31877f337eef3d43048c0a9f1cb74258 (diff)
downloadmsgpack-python-752e3d1b783fc1c12a28e05a93aa73ac7c6b751c.tar.gz
Implemented encoding for strings
* Packer by default uses `utf-8` encoding by default * Unpacker uses `None` by default, so no decoding is done * Both pack and unpack has `encoding` and `unicode_errors` arguments, if `encoding` is `None` no encoding/decoding is done, otherwise it is python codec. `unicode_errors` is supplied as `errors` parameter to codec
Diffstat (limited to 'test3/test_obj.py')
-rw-r--r--test3/test_obj.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test3/test_obj.py b/test3/test_obj.py
index 236988d..b54021f 100644
--- a/test3/test_obj.py
+++ b/test3/test_obj.py
@@ -26,7 +26,7 @@ def test_decode_hook():
unpacked = unpacks(packed, object_hook=_decode_complex)
eq_(unpacked[1], 1+2j)
-@raises(TypeError)
+@raises(ValueError)
def test_bad_hook():
packed = packs([3, 1+2j], default=lambda o: o)
unpacked = unpacks(packed)