mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-31 17:40:54 +00:00
Fix unpacker doesn't raise exception for invalid input.
This commit is contained in:
parent
9dc299bd8d
commit
72416e403c
2 changed files with 9 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue