diff --git a/skimage/_shared/testing.py b/skimage/_shared/testing.py index 510bf03d..0d40c47f 100644 --- a/skimage/_shared/testing.py +++ b/skimage/_shared/testing.py @@ -92,11 +92,12 @@ def roundtrip(img, plugin, suffix): temp_file.close() fname = temp_file.name io.imsave(fname, img, plugin=plugin) + new = io.imread(fname, plugin=plugin) try: os.remove(fname) except Exception: pass - return io.imread(fname, plugin=plugin) + return new def ubyte_check(plugin, fmt='png'):