From c230a9b0b2e41175c4779b1582cf3227067b1a3e Mon Sep 17 00:00:00 2001 From: jevans Date: Sat, 10 May 2014 20:02:12 -0400 Subject: [PATCH] Fixed expected warning message on 2.7. #229 --- glymur/test/test_jp2box_uuid.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/glymur/test/test_jp2box_uuid.py b/glymur/test/test_jp2box_uuid.py index e346ade..3c322a5 100644 --- a/glymur/test/test_jp2box_uuid.py +++ b/glymur/test/test_jp2box_uuid.py @@ -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')