|
33 | 33 | ) |
34 | 34 | def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir): |
35 | 35 | path = tmpdir.join('file.txt') |
36 | | - path.write(input_s) |
| 36 | + path.write_binary(input_s) |
37 | 37 | ret = mixed_line_ending(('--fix=auto', path.strpath)) |
38 | 38 |
|
39 | 39 | assert ret == expected_retval |
@@ -69,7 +69,7 @@ def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir): |
69 | 69 | ) |
70 | 70 | def test_detect_mixed_line_ending(input_s, expected_retval, output, tmpdir): |
71 | 71 | path = tmpdir.join('file.txt') |
72 | | - path.write(input_s) |
| 72 | + path.write_binary(input_s) |
73 | 73 | ret = mixed_line_ending(('--fix=no', path.strpath)) |
74 | 74 |
|
75 | 75 | assert ret == expected_retval |
@@ -108,7 +108,7 @@ def test_mixed_line_ending_fix_force_lf( |
108 | 108 | tmpdir, |
109 | 109 | ): |
110 | 110 | path = tmpdir.join('file.txt') |
111 | | - path.write(input_s) |
| 111 | + path.write_binary(input_s) |
112 | 112 | ret = mixed_line_ending(('--fix=lf', path.strpath)) |
113 | 113 |
|
114 | 114 | assert ret == expected_retval |
@@ -147,7 +147,7 @@ def test_mixed_line_ending_fix_force_crlf( |
147 | 147 | tmpdir, |
148 | 148 | ): |
149 | 149 | path = tmpdir.join('file.txt') |
150 | | - path.write(input_s) |
| 150 | + path.write_binary(input_s) |
151 | 151 | ret = mixed_line_ending(('--fix=crlf', path.strpath)) |
152 | 152 |
|
153 | 153 | assert ret == expected_retval |
|
0 commit comments