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
73e55b58
Commit
73e55b58
authored
6 years ago
by
Martin Craig
Browse files
Options
Downloads
Patches
Plain Diff
Updated logcmd test for new interpretation of this parameter
It is now a stream in its own right rather than a boolean
parent
55d57e02
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
+10
-8
10 additions, 8 deletions
tests/test_run.py
with
10 additions
and
8 deletions
tests/test_run.py
+
10
−
8
View file @
73e55b58
...
...
@@ -353,20 +353,22 @@ def test_run_logcmd():
exit 0
"""
).
strip
()
expstdout
=
'
./script.sh 1 2 3
\n
output 1 2 3
\n
'
expcmd
=
'
./script.sh 1 2 3
\n
'
expstdout
=
'
output 1 2 3
\n
'
with
tempdir
.
tempdir
():
mkexec
(
'
script.sh
'
,
test_script
)
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
})
assert
stdout
==
expstdout
mkexec
(
'
script.sh
'
,
test_script
)
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
})
assert
stdout
==
expstdout
with
open
(
'
my_stdout
'
,
'
wt
'
)
as
stdoutf
:
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
stdoutf
})
assert
stdout
==
expstdout
assert
open
(
'
my_stdout
'
,
'
rt
'
).
read
()
==
expcmd
with
open
(
'
my_stdout
'
,
'
wt
'
)
as
stdoutf
:
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
,
'
stdout
'
:
stdoutf
})
log
=
{
'
cmd
'
:
stdoutf
,
"
stdout
"
:
stdoutf
})
assert
stdout
==
expstdout
assert
open
(
'
my_stdout
'
,
'
rt
'
).
read
()
==
expstdout
assert
open
(
'
my_stdout
'
,
'
rt
'
).
read
()
==
expcmd
+
expstdout
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