Re: [scikits-image] Restore previous io plugins (#152)
On 2/26/2012 12:05 PM, St�fan van der Walt wrote:
On Sun, Feb 26, 2012 at 8:08 AM, Zachary Pincus<zachary.pincus@yale.edu> wrote:
This fixes an issue when running skimage.io.tests. When the tifffile plugin is left active two subsequent tests in skimage.morphology fail to read PNG files. Should I add similar teardown() stanzas to all of the image IO plugin tests so that none are left present thereafter, to avoid other such errors? (Though the other plugins read PNGs, it might be a better habit to tear everything down anyway.) Thanks, I also thought this would be a good idea, after seeing Christoph's patch.
St�fan
Instead of restoring the default plugins after each test module, maybe it would be better/cleaner/safer for the tests to never change the default plugins but to just load the plugin and explicitly specify the plugin in each imread, imwrite, etc. function call? It seems there is currently no way to load a plugin without making it the default. This could be achieved by changing the use_plugin function to accept another option for the `kind` parameter, e.g. an empty string, signaling that the plugin should only be loaded. Probably too late for the 0.5 release. Christoph
On Sun, Feb 26, 2012 at 12:25 PM, Christoph Gohlke <cjgohlke@gmail.com> wrote:
Instead of restoring the default plugins after each test module, maybe it would be better/cleaner/safer for the tests to never change the default plugins but to just load the plugin and explicitly specify the plugin in each imread, imwrite, etc. function call? It seems there is currently no way to load a plugin without making it the default. This could be achieved by changing the use_plugin function to accept another option for the `kind` parameter, e.g. an empty string, signaling that the plugin should only be loaded. Probably too late for the 0.5 release.
Ideally, the ``imread(..., plugin='fits')`` functionality should auto-load the FITS-plugin---I should see why this is not currently working, because it seems like a bug. Stéfan
participants (2)
-
Christoph Gohlke
-
Stéfan van der Walt