Fixed expected warning message on 2.7. #229

This commit is contained in:
jevans 2014-05-10 20:02:12 -04:00
commit c230a9b0b2

View file

@ -170,8 +170,12 @@ class TestUUIDExif(unittest.TestCase):
j = glymur.Jp2k(tfile.name)
self.assertTrue(issubclass(w[0].category, UserWarning))
msg = 'The byte order indication in the TIFF header '
msg += "(b'JI') is invalid. "
msg += "It should be either b'II' or b'MM'."
if sys.hexversion < 0x03000000:
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.assertEqual(j.box[-1].box_id, 'uuid')