Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
396f0869
...
396f0869504a5a07acfc4bfa70e5ac0404b5012b
authored
2013-08-05 18:25:01 -0600
by
hexid
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update python test script to work with python3
1 parent
f6b352ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
tests/clitests/runtests.py
tests/clitests/runtests.py
View file @
396f086
...
...
@@ -40,18 +40,18 @@ class CasperExecTest(unittest.TestCase):
failing
=
kwargs
.
get
(
'failing'
,
False
)
cmd_args
=
[
CASPER_EXEC
,
'--no-colors'
]
+
cmd
.
split
(
' '
)
try
:
return
subprocess
.
check_output
(
cmd_args
)
.
strip
()
return
subprocess
.
check_output
(
cmd_args
)
.
strip
()
.
decode
(
'utf-8'
)
if
failing
:
raise
AssertionError
(
'Command
%
s has not failed'
%
cmd
)
except
subprocess
.
CalledProcessError
as
err
:
if
failing
:
return
err
.
output
return
err
.
output
.
decode
(
'utf-8'
)
else
:
raise
IOError
(
'Command
%
s exited with status
%
s'
%
(
cmd
,
err
.
errorcode
))
def
assertCommandOutputEquals
(
self
,
cmd
,
result
,
**
kwargs
):
self
.
assertEqual
s
(
self
.
runCommand
(
cmd
),
result
)
self
.
assertEqual
(
self
.
runCommand
(
cmd
),
result
)
def
assertCommandOutputContains
(
self
,
cmd
,
what
,
**
kwargs
):
if
not
what
:
...
...
Please
register
or
sign in
to post a comment