Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
FSL
fslpy
Commits
a12196f8
There was a problem fetching the pipeline summary.
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
Pipeline
#
Changes
1
Pipelines
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
...
@@ -23,7 +23,7 @@ from fsl.utils.platform import platform as fslplatform
import
fsl.utils.run
as
run
import
fsl.utils.run
as
run
import
fsl.utils.fslsub
as
fslsub
import
fsl.utils.fslsub
as
fslsub
from
.
import
make_random_image
,
mockFSLDIR
,
touch
from
.
import
make_random_image
,
mockFSLDIR
def
test_run
():
def
test_run
():
...
@@ -158,8 +158,8 @@ def mock_submit(cmd, **kwargs):
...
@@ -158,8 +158,8 @@ def mock_submit(cmd, **kwargs):
f
.
write
(
output
)
f
.
write
(
output
)
with
open
(
'
{}.e{}
'
.
format
(
name
,
jid
),
'
wt
'
)
as
f
:
with
open
(
'
{}.e{}
'
.
format
(
name
,
jid
),
'
wt
'
)
as
f
:
for
k
,
v
in
kwargs
.
item
s
():
for
k
in
sorted
(
kwargs
.
key
s
()
)
:
f
.
write
(
'
{}: {}
\n
'
.
format
(
k
,
v
))
f
.
write
(
'
{}: {}
\n
'
.
format
(
k
,
kwargs
[
k
]
))
return
(
jid
,)
return
(
jid
,)
...
@@ -200,7 +200,8 @@ def test_run_submit():
...
@@ -200,7 +200,8 @@ def test_run_submit():
stdout
,
stderr
=
fslsub
.
output
(
jid
)
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
stdout
.
strip
()
==
'
test_script running
'
assert
stderr
.
strip
()
==
experr
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