Skip to content

Commit 427760d

Browse files
committed
BF: skip detailed testing of nib-ls output if .mnc can't be loaded
1 parent cd92102 commit 427760d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nibabel/tests/test_scripts.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
from nose.tools import (assert_true, assert_false, assert_not_equal,
2222
assert_equal)
23+
from nose import SkipTest
2324

2425
from numpy.testing import assert_almost_equal, assert_array_equal
2526

@@ -81,6 +82,11 @@ def test_nib_ls_multiple():
8182
code, stdout, stderr = run_command(['nib-ls'] + fnames)
8283
stdout_lines = stdout.split('\n')
8384
assert_equal(len(stdout_lines), 4)
85+
try:
86+
load(pjoin(DATA_PATH, 'small.mnc'))
87+
except:
88+
raise SkipTest("For the other tests should be able to load MINC files")
89+
8490
# they should be indented correctly. Since all files are int type -
8591
ln = max(len(f) for f in fnames)
8692
assert_equal([l[ln:ln+2] for l in stdout_lines], [' i']*4,

0 commit comments

Comments
 (0)