mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-08 00:50:59 +08:00
Merge pull request #152 from cgohlke/patch-1
BUG: Restore previous io plugins.
This commit is contained in:
@@ -9,11 +9,19 @@ from tempfile import NamedTemporaryFile
|
||||
|
||||
try:
|
||||
import skimage.io._plugins.tifffile_plugin as tf
|
||||
_plugins = sio.plugin_order()
|
||||
TF_available = True
|
||||
sio.use_plugin('tifffile')
|
||||
except OSError:
|
||||
TF_available = False
|
||||
|
||||
|
||||
def teardown():
|
||||
if TF_available:
|
||||
for k, v in _plugins.items():
|
||||
sio.use_plugin(v[0], k)
|
||||
|
||||
|
||||
@skipif(not TF_available)
|
||||
def test_imread_uint16():
|
||||
expected = np.load(os.path.join(si.data_dir, 'chessboard_GRAY_U8.npy'))
|
||||
@@ -21,6 +29,7 @@ def test_imread_uint16():
|
||||
assert img.dtype == np.uint16
|
||||
assert_array_almost_equal(img, expected)
|
||||
|
||||
|
||||
@skipif(not TF_available)
|
||||
def test_imread_uint16_big_endian():
|
||||
expected = np.load(os.path.join(si.data_dir, 'chessboard_GRAY_U8.npy'))
|
||||
|
||||
Reference in New Issue
Block a user