mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-20 12:50:52 +08:00
BUG: Ensure that the appropriate I/O plugin is used in the test suite.
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user