From db45127fa93b495337df3e39a1c4622fce297ada Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 3 Dec 2013 23:16:50 -0600 Subject: [PATCH] Fix test so it doesn't have side-effects --- skimage/io/tests/test_io.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skimage/io/tests/test_io.py b/skimage/io/tests/test_io.py index 51b9a336..6b74ae34 100644 --- a/skimage/io/tests/test_io.py +++ b/skimage/io/tests/test_io.py @@ -33,8 +33,12 @@ def test_imread_url(): 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') + plugins = plugin_store['imread'] plugin_store['imread'] = [] - io.imread(image_path) + try: + io.imread(image_path) + finally: + plugin_store['imread'] = plugins if __name__ == "__main__":