From e20cf07a8a6f50c325f2ca60e81f28e5db43e2db Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 23 Sep 2013 16:22:49 -0400 Subject: [PATCH] Requalified on 1.3. #121 --- glymur/test/test_jp2box.py | 2 +- glymur/test/test_jp2k.py | 2 +- glymur/test/test_printing.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index 15aed61..ff69f75 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -57,7 +57,7 @@ def load_tests(loader, tests, ignore): return tests -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or OPENJP2_IS_V2_OFFICIAL, "Not supported until 2.0+.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index 394f9e5..ed78870 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -117,7 +117,7 @@ class TestJp2kBadXmlFile(unittest.TestCase): self.assertIsNone(jp2k.box[3].xml) -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or OPENJP2_IS_V2_OFFICIAL, "Missing openjp2 library version 2.0+.") class TestJp2k_2_1(unittest.TestCase): diff --git a/glymur/test/test_printing.py b/glymur/test/test_printing.py index 81f998e..2694aa2 100644 --- a/glymur/test/test_printing.py +++ b/glymur/test/test_printing.py @@ -10,6 +10,7 @@ # pylint: disable=R0904 import os +import re import struct import sys import tempfile @@ -36,8 +37,8 @@ from .fixtures import OPJ_DATA_ROOT, opj_data_file @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 0, - "Missing library.") +@unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version), + "Need at least 1.5 in order to write jp2 files.") class TestPrintingNeedsLib(unittest.TestCase): """These tests require the library, mostly in order to just setup the test. """