diff options
| author | Anthony Sottile <asottile@umich.edu> | 2018-10-23 22:01:09 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2018-10-23 22:01:09 +0000 |
| commit | ba2fb9c53a8316642249598f599bbf7608d54260 (patch) | |
| tree | 6e43d3301481b38a2c665298ac8fb9d40cda8b07 /tests | |
| parent | 63b91c95ea7795e3c3c90f2d643f685bfff312e9 (diff) | |
| parent | fb1f2571286420f41b08b6f08d4d4894aef14fcc (diff) | |
| download | flake8-ba2fb9c53a8316642249598f599bbf7608d54260.tar.gz | |
Merge branch 'revert-63b91c95' into 'master'
Revert "Merge branch 'match_newlines_py3' into 'master'"
See merge request pycqa/flake8!254
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_file_processor.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/unit/test_file_processor.py b/tests/unit/test_file_processor.py index b5e8323..312827b 100644 --- a/tests/unit/test_file_processor.py +++ b/tests/unit/test_file_processor.py @@ -27,32 +27,6 @@ def test_read_lines_splits_lines(): for line in lines) -def lines_from_file(tmpdir, lines): - f = tmpdir.join('f.py') - f.write(''.join(lines)) - return processor.FileProcessor(f.strpath, options_from()).lines - - -def test_read_lines_universal_newlines(tmpdir): - r"""Verify that line endings are translated to \n.""" - lines = lines_from_file(tmpdir, ['# coding: utf-8\r\n', 'x = 1\r\n']) - assert lines == ['# coding: utf-8\n', 'x = 1\n'] - - -def test_read_lines_incorrect_utf_16(tmpdir): - """Verify that a file which incorrectly claims it is utf16 is still read - as latin-1. - """ - lines = lines_from_file(tmpdir, ['# coding: utf16\n', 'x = 1\n']) - assert lines == ['# coding: utf16\n', 'x = 1\n'] - - -def test_read_lines_unknown_encoding(tmpdir): - """Verify that an unknown encoding is still read as latin-1.""" - lines = lines_from_file(tmpdir, ['# coding: fake-encoding\n', 'x = 1\n']) - assert lines == ['# coding: fake-encoding\n', 'x = 1\n'] - - @pytest.mark.parametrize('first_line', [ '\xEF\xBB\xBF"""Module docstring."""\n', u'\uFEFF"""Module docstring."""\n', |
