Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
fb005c5d
Commit
fb005c5d
authored
Aug 20, 2021
by
Paul McCarthy
🚵
Browse files
TEST: adjust fsl.utils.run.run(.. submit=X) unit test
parent
f93a4f88
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_run.py
View file @
fb005c5d
...
...
@@ -268,7 +268,7 @@ def test_runfsl():
run
.
FSL_PREFIX
=
None
def
mock_sub
mit
(
cmd
,
**
kwargs
):
def
mock_
fsl_
sub
(
cmd
,
**
kwargs
):
if
isinstance
(
cmd
,
str
):
name
=
cmd
.
split
()[
0
]
else
:
...
...
@@ -286,7 +286,7 @@ def mock_submit(cmd, **kwargs):
for
k
in
sorted
(
kwargs
.
keys
()):
f
.
write
(
'{}: {}
\n
'
.
format
(
k
,
kwargs
[
k
]))
return
jid
return
(
jid
,
''
)
def
test_run_submit
():
...
...
@@ -304,7 +304,7 @@ def test_run_submit():
with
tempdir
.
tempdir
(),
\
mockFSLDIR
(),
\
mock
.
patch
(
'fsl.
utils.fslsub.submit
'
,
mock_sub
mit
):
mock
.
patch
(
'fsl.
wrappers.fsl_sub
'
,
mock_
fsl_
sub
):
mkexec
(
op
.
expandvars
(
'$FSLDIR/bin/fsltest'
),
test_script
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment