Fixed expected warning message on 2.7. #229
This commit is contained in:
parent
61192b73d3
commit
c230a9b0b2
1 changed files with 6 additions and 2 deletions
|
|
@ -170,8 +170,12 @@ class TestUUIDExif(unittest.TestCase):
|
||||||
j = glymur.Jp2k(tfile.name)
|
j = glymur.Jp2k(tfile.name)
|
||||||
self.assertTrue(issubclass(w[0].category, UserWarning))
|
self.assertTrue(issubclass(w[0].category, UserWarning))
|
||||||
msg = 'The byte order indication in the TIFF header '
|
msg = 'The byte order indication in the TIFF header '
|
||||||
msg += "(b'JI') is invalid. "
|
if sys.hexversion < 0x03000000:
|
||||||
msg += "It should be either b'II' or b'MM'."
|
msg += "(JI) is invalid. "
|
||||||
|
msg += "It should be either [73, 73] or [77, 77]."
|
||||||
|
else:
|
||||||
|
msg += "(b'JI') is invalid. "
|
||||||
|
msg += "It should be either b'II' or b'MM'."
|
||||||
self.assertTrue(msg in str(w[0].message))
|
self.assertTrue(msg in str(w[0].message))
|
||||||
|
|
||||||
self.assertEqual(j.box[-1].box_id, 'uuid')
|
self.assertEqual(j.box[-1].box_id, 'uuid')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue