Skip to content
Snippets Groups Projects
Commit 1e390b9a authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

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

parent d6d18d56
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment