diff options
author | elie <elie> | 2015-04-24 18:37:19 +0000 |
---|---|---|
committer | elie <elie> | 2015-04-24 18:37:19 +0000 |
commit | 7ead58fff72d7a092c825b13daed9f9b95e156d8 (patch) | |
tree | 7b371fc6b40858f90c92c1f8fde86779bc830f56 | |
parent | c2204e13e60f514e2fafe601959ec4ea444d5c20 (diff) | |
download | pyasn1-7ead58fff72d7a092c825b13daed9f9b95e156d8.tar.gz |
broken REAL substrate decoding test added
-rw-r--r-- | test/codec/ber/test_decoder.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codec/ber/test_decoder.py b/test/codec/ber/test_decoder.py index ec58bde..72ed77f 100644 --- a/test/codec/ber/test_decoder.py +++ b/test/codec/ber/test_decoder.py @@ -382,6 +382,14 @@ class RealDecoderTestCase(unittest.TestCase): else: assert 0, 'wrong tagFormat worked out' + def testShortEncoding(self): + try: + decoder.decode(ints2octs((9, 1, 131))) + except PyAsn1Error: + pass + else: + assert 0, 'accepted too-short real' + class SequenceDecoderTestCase(unittest.TestCase): def setUp(self): self.s = univ.Sequence(componentType=namedtype.NamedTypes( |