diff --git a/skimage/io/tests/test_io.py b/skimage/io/tests/test_io.py index 8049860a..51b9a336 100644 --- a/skimage/io/tests/test_io.py +++ b/skimage/io/tests/test_io.py @@ -4,6 +4,7 @@ from numpy.testing import assert_array_equal, raises, run_module_suite import numpy as np import skimage.io as io +from skimage.io._plugins.plugin import plugin_store from skimage import data_dir @@ -28,5 +29,13 @@ def test_imread_url(): assert image.shape == (512, 512) +@raises(RuntimeError) +def test_imread_no_plugin(): + # tweak data path so that file URI works on both unix and windows. + image_path = os.path.join(data_dir, 'lena.png') + plugin_store['imread'] = [] + io.imread(image_path) + + if __name__ == "__main__": run_module_suite()