BUG: Ensure that the appropriate I/O plugin is used in the test suite.

This commit is contained in:
Stefan van der Walt
2012-05-07 13:48:56 -07:00
parent a8e96f9b57
commit 9c13bab887
2 changed files with 17 additions and 0 deletions
+10
View File
@@ -14,6 +14,16 @@ try:
except OSError:
FI_available = False
def setup_module(self):
"""The effect of the `plugin.use` call may be overridden by later imports.
Call `use_plugin` directly before the tests to ensure that freeimage is
used.
"""
sio.use_plugin('freeimage')
@skipif(not FI_available)
def test_imread():
img = sio.imread(os.path.join(si.data_dir, 'color.png'))
+7
View File
@@ -18,6 +18,13 @@ else:
PIL_available = True
def setup_module(self):
"""The effect of the `plugin.use` call may be overridden by later imports.
Call `use_plugin` directly before the tests to ensure that PIL is used.
"""
use_plugin('pil')
@skipif(not PIL_available)
def test_imread_flatten():
# a color image is flattened