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

TEST: adjust fsl.utils.run.run(.. submit=X) unit test

parent f93a4f88
No related branches found
No related tags found
No related merge requests found
...@@ -268,7 +268,7 @@ def test_runfsl(): ...@@ -268,7 +268,7 @@ def test_runfsl():
run.FSL_PREFIX = None run.FSL_PREFIX = None
def mock_submit(cmd, **kwargs): def mock_fsl_sub(cmd, **kwargs):
if isinstance(cmd, str): if isinstance(cmd, str):
name = cmd.split()[0] name = cmd.split()[0]
else: else:
...@@ -286,7 +286,7 @@ def mock_submit(cmd, **kwargs): ...@@ -286,7 +286,7 @@ def mock_submit(cmd, **kwargs):
for k in sorted(kwargs.keys()): for k in sorted(kwargs.keys()):
f.write('{}: {}\n'.format(k, kwargs[k])) f.write('{}: {}\n'.format(k, kwargs[k]))
return jid return (jid, '')
def test_run_submit(): def test_run_submit():
...@@ -304,7 +304,7 @@ def test_run_submit(): ...@@ -304,7 +304,7 @@ def test_run_submit():
with tempdir.tempdir(), \ with tempdir.tempdir(), \
mockFSLDIR(), \ mockFSLDIR(), \
mock.patch('fsl.utils.fslsub.submit', mock_submit): mock.patch('fsl.wrappers.fsl_sub', mock_fsl_sub):
mkexec(op.expandvars('$FSLDIR/bin/fsltest'), test_script) mkexec(op.expandvars('$FSLDIR/bin/fsltest'), test_script)
......
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