From 72416e403c6d70b6fbc4ea8e05e1fe7f02a6561a Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Sat, 29 Dec 2012 01:39:59 +0900 Subject: Fix unpacker doesn't raise exception for invalid input. --- test/test_except.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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() -- cgit v1.2.1