Added test for error on truncated EOC file.

This commit is contained in:
jevans 2013-07-22 19:13:26 -04:00
commit 67032f5040

View file

@ -47,5 +47,9 @@ class TestSuite(unittest.TestCase):
# The last segment is truncated, so there should not be an EOC marker.
self.assertNotEqual(c.segment[-1].marker_id, 'EOC')
# The codestream is not as long as claimed.
with self.assertRaises(OSError):
j2k.read(rlevel=-1)
if __name__ == "__main__":
unittest.main()