Added test for error on truncated EOC file.
This commit is contained in:
parent
15cd084df1
commit
67032f5040
1 changed files with 4 additions and 0 deletions
|
|
@ -47,5 +47,9 @@ class TestSuite(unittest.TestCase):
|
||||||
# The last segment is truncated, so there should not be an EOC marker.
|
# The last segment is truncated, so there should not be an EOC marker.
|
||||||
self.assertNotEqual(c.segment[-1].marker_id, 'EOC')
|
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__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue