We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36684e4 commit 30ca4ceCopy full SHA for 30ca4ce
tests/test_mpy_cross.py
@@ -37,6 +37,19 @@ def test_compile_with_syntax_error():
37
assert mpy is None
38
39
40
+def test_windows_does_not_treat_binary_stdout_as_text():
41
+ # 'Hello' creates a \n byte which Windows tries to convert to a \r\n if
42
+ # the stdout is treated as text.
43
+ p, mpy = mpy_cross_compile("test.py", "print('Hello')")
44
+ p.check_returncode()
45
+ assert mpy is not None
46
+
47
+ assert 0x0A in mpy, "Expected binary output to contain a newline byte"
48
+ assert (
49
+ 0x0D not in mpy
50
+ ), "Expected binary output to not contain a carriage return byte"
51
52
53
def test_version():
54
ver = mpy_cross_version()
55
0 commit comments