MCPcopy Create free account
hub / github.com/PyCQA/flake8 / test_read_lines_unknown_encoding

Function test_read_lines_unknown_encoding

tests/unit/test_file_processor.py:44–49  ·  view source on GitHub ↗

Verify that an unknown encoding is still read as latin-1.

(tmpdir, default_options)

Source from the content-addressed store, hash-verified

42
43
44def test_read_lines_unknown_encoding(tmpdir, default_options):
45 """Verify that an unknown encoding is still read as latin-1."""
46 lines = _lines_from_file(
47 tmpdir, b"# coding: fake-encoding\nx = 1\n", default_options,
48 )
49 assert lines == ["# coding: fake-encoding\n", "x = 1\n"]
50
51
52@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

_lines_from_fileFunction · 0.85

Tested by

no test coverage detected