MCPcopy
hub / github.com/PyCQA/flake8 / test_plugin_off_by_default

Function test_plugin_off_by_default

tests/integration/test_plugins.py:146–167  ·  view source on GitHub ↗
(tmp_path, capsys)

Source from the content-addressed store, hash-verified

144
145
146def test_plugin_off_by_default(tmp_path, capsys):
147 cfg_s = f"""\
148[flake8:local-plugins]
149extension =
150 ABC = {AlwaysErrorsDisabled.__module__}:{AlwaysErrorsDisabled.__name__}
151"""
152 cfg = tmp_path.joinpath("tox.ini")
153 cfg.write_text(cfg_s)
154
155 t_py = tmp_path.joinpath("t.py")
156 t_py.touch()
157
158 cmd = (str(t_py), "--config", str(cfg))
159
160 assert main(cmd) == 0
161 out, err = capsys.readouterr()
162 assert out == err == ""
163
164 assert main((*cmd, "--enable-extension=ABC")) == 1
165 out, err = capsys.readouterr()
166 assert out == f"{t_py}:1:1: ABC123 error\n"
167 assert err == ""
168
169
170def yields_physical_line(physical_line):

Callers

nothing calls this directly

Calls 1

mainFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…