Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c3dcb590
Commit
c3dcb590
authored
May 11, 2014
by
Damien George
Browse files
Merge pull request #603 from stinos/windows-tests-newline
tests: Fix handling of newlines from expected output files on windows
parents
18ceb705
a4dbc73e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/run-tests
View file @
c3dcb590
...
...
@@ -44,8 +44,10 @@ def run_tests(pyb, tests):
# expected output given by a file, so read that in
with
open
(
test_file_expected
,
'rb'
)
as
f
:
output_expected
=
f
.
read
()
if
os
.
name
==
'nt'
:
output_expected
=
output_expected
.
replace
(
b
'
\n
'
,
b
'
\r\n
'
)
else
:
# run CPython to work out expec
e
ted output
# run CPython to work out expected output
try
:
output_expected
=
subprocess
.
check_output
([
CPYTHON3
,
'-B'
,
test_file
])
except
subprocess
.
CalledProcessError
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment