diff --git a/skimage/io/tests/test_freeimage.py b/skimage/io/tests/test_freeimage.py index 478a1a90..0f598fe6 100644 --- a/skimage/io/tests/test_freeimage.py +++ b/skimage/io/tests/test_freeimage.py @@ -21,7 +21,10 @@ def setup_module(self): used. """ - sio.use_plugin('freeimage') + try: + sio.use_plugin('freeimage') + except OSError: + pass @skipif(not FI_available) diff --git a/skimage/io/tests/test_pil.py b/skimage/io/tests/test_pil.py index 23c4d933..f54fa9e3 100644 --- a/skimage/io/tests/test_pil.py +++ b/skimage/io/tests/test_pil.py @@ -23,7 +23,10 @@ def setup_module(self): Call `use_plugin` directly before the tests to ensure that PIL is used. """ - use_plugin('pil') + try: + use_plugin('pil') + except ImportError: + pass @skipif(not PIL_available) def test_imread_flatten():