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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Evan Edmond
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():
...
@@ -353,20 +353,22 @@ def test_run_logcmd():
exit 0
exit 0
"""
).
strip
()
"""
).
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
():
with
tempdir
.
tempdir
():
mkexec
(
'
script.sh
'
,
test_script
)
mkexec
(
'
script.sh
'
,
test_script
)
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
})
assert
stdout
==
expstdout
mkexec
(
'
script.sh
'
,
test_script
)
with
open
(
'
my_stdout
'
,
'
wt
'
)
as
stdoutf
:
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
})
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
assert
stdout
==
expstdout
log
=
{
'
cmd
'
:
stdoutf
})
assert
stdout
==
expstdout
assert
open
(
'
my_stdout
'
,
'
rt
'
).
read
()
==
expcmd
with
open
(
'
my_stdout
'
,
'
wt
'
)
as
stdoutf
:
with
open
(
'
my_stdout
'
,
'
wt
'
)
as
stdoutf
:
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
stdout
=
run
.
run
(
'
./script.sh 1 2 3
'
,
log
=
{
'
cmd
'
:
True
,
'
stdout
'
:
stdoutf
})
log
=
{
'
cmd
'
:
stdoutf
,
"
stdout
"
:
stdoutf
})
assert
stdout
==
expstdout
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