Commit 1e390b9a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Fix issue with callfsl unit tests, causing other tests to fail.

parent d6d18d56
......@@ -80,6 +80,3 @@ def Atlas(name):
atlas_names = tuple(desc.atlasID for desc in atlases.listAtlases())
raise argparse.ArgumentTypeError('Requested atlas %r not one of: %r' % (name, atlas_names))
return atlases.loadAtlas(name)
......@@ -75,6 +75,11 @@ def test_callfsl():
with mock.patch('fsl.utils.callfsl.sp.check_output',
mock_check_output):
callfsl.callFSL(cmd)
fslplatform.fsldir = None
with pytest.raises(Exception):
callfsl.callFSL(cmd)
try:
oldval = fslplatform.fsldir
fslplatform.fsldir = None
with pytest.raises(Exception):
callfsl.callFSL(cmd)
finally:
fslplatform.fsldir = oldval
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment