From 47c4d9ebedb4760b84c15f504da8b9b04a8833f5 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 5 Sep 2017 19:27:34 -0700 Subject: [PATCH] Fix mixed-line-ending tests on windows --- tests/mixed_line_ending_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/mixed_line_ending_test.py b/tests/mixed_line_ending_test.py index 9b49b5e..20fd22c 100644 --- a/tests/mixed_line_ending_test.py +++ b/tests/mixed_line_ending_test.py @@ -33,7 +33,7 @@ TESTS_FIX_AUTO = ( ) def test_mixed_line_ending_fix_auto(input_s, expected_retval, output, tmpdir): path = tmpdir.join('file.txt') - path.write(input_s) + path.write_binary(input_s) ret = mixed_line_ending(('--fix=auto', path.strpath)) assert ret == expected_retval @@ -69,7 +69,7 @@ TESTS_NO_FIX = ( ) def test_detect_mixed_line_ending(input_s, expected_retval, output, tmpdir): path = tmpdir.join('file.txt') - path.write(input_s) + path.write_binary(input_s) ret = mixed_line_ending(('--fix=no', path.strpath)) assert ret == expected_retval @@ -108,7 +108,7 @@ def test_mixed_line_ending_fix_force_lf( tmpdir, ): path = tmpdir.join('file.txt') - path.write(input_s) + path.write_binary(input_s) ret = mixed_line_ending(('--fix=lf', path.strpath)) assert ret == expected_retval @@ -147,7 +147,7 @@ def test_mixed_line_ending_fix_force_crlf( tmpdir, ): path = tmpdir.join('file.txt') - path.write(input_s) + path.write_binary(input_s) ret = mixed_line_ending(('--fix=crlf', path.strpath)) assert ret == expected_retval