Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
a12196f8
Commit
a12196f8
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
fix test
parent
71448565
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_run.py
+5
-4
5 additions, 4 deletions
tests/test_run.py
with
5 additions
and
4 deletions
tests/test_run.py
+
5
−
4
View file @
a12196f8
...
...
@@ -23,7 +23,7 @@ from fsl.utils.platform import platform as fslplatform
import
fsl.utils.run
as
run
import
fsl.utils.fslsub
as
fslsub
from
.
import
make_random_image
,
mockFSLDIR
,
touch
from
.
import
make_random_image
,
mockFSLDIR
def
test_run
():
...
...
@@ -158,8 +158,8 @@ def mock_submit(cmd, **kwargs):
f
.
write
(
output
)
with
open
(
'
{}.e{}
'
.
format
(
name
,
jid
),
'
wt
'
)
as
f
:
for
k
,
v
in
kwargs
.
item
s
():
f
.
write
(
'
{}: {}
\n
'
.
format
(
k
,
v
))
for
k
in
sorted
(
kwargs
.
key
s
()
)
:
f
.
write
(
'
{}: {}
\n
'
.
format
(
k
,
kwargs
[
k
]
))
return
(
jid
,)
...
...
@@ -200,7 +200,8 @@ def test_run_submit():
stdout
,
stderr
=
fslsub
.
output
(
jid
)
experr
=
'
\n
'
.
join
([
'
{}: {}
'
.
format
(
k
,
v
)
for
k
,
v
in
kwargs
.
items
()])
experr
=
'
\n
'
.
join
([
'
{}: {}
'
.
format
(
k
,
kwargs
[
k
])
for
k
in
sorted
(
kwargs
.
keys
())])
assert
stdout
.
strip
()
==
'
test_script running
'
assert
stderr
.
strip
()
==
experr
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment