diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index 71dbd72..0d265b0 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -57,11 +57,7 @@ def load_tests(loader, tests, ignore): return tests -@unittest.skipIf(OPENJP2_IS_V2_OFFICIAL, - "Requires v2.0.0+ in order to run.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestChannelDefinition(unittest.TestCase): """Test suite for channel definition boxes.""" @@ -505,8 +501,6 @@ class TestColourSpecificationBox(unittest.TestCase): approximation=approx) -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestAppend(unittest.TestCase): """Tests for append method.""" @@ -599,8 +593,6 @@ class TestAppend(unittest.TestCase): jp2.append(uuidbox) -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestWrap(unittest.TestCase): """Tests for wrap method.""" diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index bbf551b..b6390c4 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -56,8 +56,6 @@ def load_tests(loader, tests, ignore): @unittest.skipIf(os.name == "nt", "NamedTemporaryFile issue on windows") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestJp2kBadXmlFile(unittest.TestCase): """Test suite for bad XML box situations""" diff --git a/glymur/test/test_opj_suite_neg.py b/glymur/test/test_opj_suite_neg.py index 66115a2..2e7e3b2 100644 --- a/glymur/test/test_opj_suite_neg.py +++ b/glymur/test/test_opj_suite_neg.py @@ -12,6 +12,7 @@ seem like logical negative tests to add. # pylint: disable=F0401 import os +import re import sys import tempfile @@ -22,16 +23,14 @@ else: import numpy as np -from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG from .fixtures import OPJ_DATA_ROOT, opj_data_file from glymur import Jp2k import glymur -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") -@unittest.skipIf(NO_READ_BACKEND, NO_READ_BACKEND_MSG) +@unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version), + "Functionality not implemented for 1.3, 1.4") @unittest.skipIf(OPJ_DATA_ROOT is None, "OPJ_OPJ_DATA_ROOT environment variable not set") class TestSuiteNegative(unittest.TestCase): diff --git a/glymur/test/test_printing.py b/glymur/test/test_printing.py index 8591b1b..81f998e 100644 --- a/glymur/test/test_printing.py +++ b/glymur/test/test_printing.py @@ -36,8 +36,8 @@ from .fixtures import OPJ_DATA_ROOT, opj_data_file @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 0, + "Missing library.") class TestPrintingNeedsLib(unittest.TestCase): """These tests require the library, mostly in order to just setup the test. """