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

Function test_errors_sorted

tests/integration/test_main.py:101–118  ·  view source on GitHub ↗
(tmpdir, capsys)

Source from the content-addressed store, hash-verified

99
100
101def test_errors_sorted(tmpdir, capsys):
102 with tmpdir.as_cwd():
103 for c in "abcde":
104 tmpdir.join(f"{c}.py").write("import os\n")
105 assert cli.main(["./"]) == 1
106
107 # file traversal was done in inode-order before
108 # this uses a significant number of files such that it's unlikely to pass
109 expected = """\
110./a.py:1:1: F401 'os' imported but unused
111./b.py:1:1: F401 'os' imported but unused
112./c.py:1:1: F401 'os' imported but unused
113./d.py:1:1: F401 'os' imported but unused
114./e.py:1:1: F401 'os' imported but unused
115"""
116 out, err = capsys.readouterr()
117 assert out == expected
118 assert err == ""
119
120
121def test_extend_exclude(tmpdir, capsys):

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected