mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 01:37:54 +08:00
BUG: Fix file URI in test (2nd attempt)
This commit is contained in:
@@ -20,7 +20,10 @@ def test_stack_non_array():
|
||||
|
||||
|
||||
def test_imread_url():
|
||||
image_url = 'file:{0}{0}{1}{0}camera.png'.format(os.path.sep, data_dir)
|
||||
# tweak data path so that file URI works on both unix and windows.
|
||||
data_path = data_dir.lstrip(os.path.sep)
|
||||
data_path = data_path.replace(os.path.sep, '/')
|
||||
image_url = 'file:///{0}/camera.png'.format(data_path)
|
||||
image = io.imread(image_url)
|
||||
assert image.shape == (512, 512)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user