Improve test coverage

This commit is contained in:
Morgan Courbet 2017-07-04 22:24:24 +02:00
parent 63bb1fd1f5
commit 3dbeeeefe5
No known key found for this signature in database
GPG key ID: 467299D324A21B24
2 changed files with 30 additions and 24 deletions

View file

@ -12,6 +12,8 @@ TESTS_FIX_AUTO = (
(b'foo\r\nbar\nbaz\n', 1, b'foo\nbar\nbaz\n'),
# mixed with majority of 'CRLF'
(b'foo\r\nbar\nbaz\r\n', 1, b'foo\r\nbar\r\nbaz\r\n'),
# mixed with as much 'LF' as 'CRLF'
(b'foo\r\nbar\nbaz', 1, b'foo\r\nbar\nbaz'),
)
@ -98,3 +100,8 @@ def test_mixed_line_ending_fix_force_crlf(input_s, expected_retval, output,
assert ret == expected_retval
assert path.read() == output
def test_check_filenames():
with pytest.raises(IOError):
mixed_line_ending(['/dev/null'])