Skip to content

Commit 47c4d9e

Browse files
committed
Fix mixed-line-ending tests on windows
1 parent fc8a5b2 commit 47c4d9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/mixed_line_ending_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
)
3434
def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir):
3535
path = tmpdir.join('file.txt')
36-
path.write(input_s)
36+
path.write_binary(input_s)
3737
ret = mixed_line_ending(('--fix=auto', path.strpath))
3838

3939
assert ret == expected_retval
@@ -69,7 +69,7 @@ def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir):
6969
)
7070
def test_detect_mixed_line_ending(input_s, expected_retval, output, tmpdir):
7171
path = tmpdir.join('file.txt')
72-
path.write(input_s)
72+
path.write_binary(input_s)
7373
ret = mixed_line_ending(('--fix=no', path.strpath))
7474

7575
assert ret == expected_retval
@@ -108,7 +108,7 @@ def test_mixed_line_ending_fix_force_lf(
108108
tmpdir,
109109
):
110110
path = tmpdir.join('file.txt')
111-
path.write(input_s)
111+
path.write_binary(input_s)
112112
ret = mixed_line_ending(('--fix=lf', path.strpath))
113113

114114
assert ret == expected_retval
@@ -147,7 +147,7 @@ def test_mixed_line_ending_fix_force_crlf(
147147
tmpdir,
148148
):
149149
path = tmpdir.join('file.txt')
150-
path.write(input_s)
150+
path.write_binary(input_s)
151151
ret = mixed_line_ending(('--fix=crlf', path.strpath))
152152

153153
assert ret == expected_retval

0 commit comments

Comments
 (0)