diff options
author | INADA Naoki <inada-n@klab.com> | 2012-12-29 01:39:59 +0900 |
---|---|---|
committer | INADA Naoki <inada-n@klab.com> | 2012-12-29 01:39:59 +0900 |
commit | 72416e403c6d70b6fbc4ea8e05e1fe7f02a6561a (patch) | |
tree | 9874a48273c5869993cd31dbab4ac7f426a77633 /test/test_except.py | |
parent | 9dc299bd8da75e61f512e6ba50bd06face71f8a0 (diff) | |
download | msgpack-python-0.2.tar.gz |
Fix unpacker doesn't raise exception for invalid input.0.2
Diffstat (limited to 'test/test_except.py')
-rw-r--r-- | test/test_except.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_except.py b/test/test_except.py index e142dd6..35287df 100644 --- a/test/test_except.py +++ b/test/test_except.py @@ -6,6 +6,7 @@ from msgpack import packb, unpackb import datetime + class DummyException(Exception): pass @@ -28,6 +29,11 @@ def test_raise_from_object_hook(): object_pairs_hook=hook) +@raises(ValueError) +def test_invalidvalue(): + unpackb(b'\xd9\x97#DL_') + + if __name__ == '__main__': from nose import main main() |