diff --git a/glymur/test/fixtures.py b/glymur/test/fixtures.py index 845c342..b17afc0 100644 --- a/glymur/test/fixtures.py +++ b/glymur/test/fixtures.py @@ -38,14 +38,19 @@ except: # The Cinema2K/4K tests seem to need the freeimage backend to skimage.io -# in order to work. +# in order to work. Unfortunately, scikit-image/freeimage is about as wonky as +# it gets. Anaconda can get totally weirded out on versions up through 3.6.4 +# on Python3 with scikit-image up through version 0.10.0. +NO_SKIMAGE_FREEIMAGE_SUPPORT = False try: + import skimage import skimage.io - if 'freeimage' in skimage.io.find_available_plugins(loaded=True).keys(): - skimage.io.use_plugin('freeimage', 'imread') - NO_SKIMAGE_FREEIMAGE_SUPPORT = False - else: + if (((sys.hexversion >= 0x03000000) and + ('Anaconda' in sys.version) and + (re.match('0.10', skimage.__version__)))): NO_SKIMAGE_FREEIMAGE_SUPPORT = True + else: + skimage.io.use_plugin('freeimage', 'imread') except ((ImportError, RuntimeError)): NO_SKIMAGE_FREEIMAGE_SUPPORT = True diff --git a/glymur/test/test_opj_suite_neg.py b/glymur/test/test_opj_suite_neg.py index 244d244..bee06f7 100644 --- a/glymur/test/test_opj_suite_neg.py +++ b/glymur/test/test_opj_suite_neg.py @@ -16,6 +16,10 @@ import unittest import warnings import numpy as np +try: + import skimage.io +except ImportError: + pass from .fixtures import OPJ_DATA_ROOT, opj_data_file, read_image from .fixtures import NO_READ_BACKEND, NO_READ_BACKEND_MSG diff --git a/glymur/test/test_opj_suite_write.py b/glymur/test/test_opj_suite_write.py index e3d80ff..2af76d8 100644 --- a/glymur/test/test_opj_suite_write.py +++ b/glymur/test/test_opj_suite_write.py @@ -14,6 +14,10 @@ import unittest import warnings import numpy as np +try: + import skimage.io +except ImportError: + pass from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG from .fixtures import OPJ_DATA_ROOT, NO_SKIMAGE_FREEIMAGE_SUPPORT