Fix test so it doesn't have side-effects

This commit is contained in:
Tony S Yu
2013-12-03 23:16:50 -06:00
parent 90f1e791d8
commit db45127fa9
+5 -1
View File
@@ -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__":