Skip to content

Commit 24b0356

Browse files
stinospfalcon
authored andcommitted
tests: Make sure test output has \r\n line-ends when running on Windows
This is the case already when using just subprocess.check_output, but in the special cases (cmdline, meminfo, ...) the carriage return gets lost during output processing so restore it in the end. This fixes the micropython/meminfo.py test on Windows.
1 parent bd9f850 commit 24b0356

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/run-tests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ def run_micropython(pyb, args, test_file):
135135
if i_mupy >= len(lines_mupy):
136136
break
137137
output_mupy = b''.join(lines_mupy)
138+
if os.name == 'nt':
139+
output_mupy = output_mupy.replace(b'\n', b'\r\n')
138140

139141
else:
140142
# a standard test

0 commit comments

Comments
 (0)