Skip to content

Commit a4dbc73

Browse files
committed
tests: Fix handling of newlines from expected output files
1 parent b2d4fc0 commit a4dbc73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/run-tests

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ def run_tests(pyb, tests):
4444
# expected output given by a file, so read that in
4545
with open(test_file_expected, 'rb') as f:
4646
output_expected = f.read()
47+
if os.name == 'nt':
48+
output_expected = output_expected.replace(b'\n', b'\r\n')
4749
else:
48-
# run CPython to work out expeceted output
50+
# run CPython to work out expected output
4951
try:
5052
output_expected = subprocess.check_output([CPYTHON3, '-B', test_file])
5153
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)