MCPcopy Index your code
hub / github.com/PyCQA/flake8 / test_plugin_gets_enabled_by_default

Function test_plugin_gets_enabled_by_default

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

Source from the content-addressed store, hash-verified

126
127
128def test_plugin_gets_enabled_by_default(tmp_path, capsys):
129 cfg_s = f"""\
130[flake8:local-plugins]
131extension =
132 ABC = {AlwaysErrors.__module__}:{AlwaysErrors.__name__}
133"""
134 cfg = tmp_path.joinpath("tox.ini")
135 cfg.write_text(cfg_s)
136
137 t_py = tmp_path.joinpath("t.py")
138 t_py.touch()
139
140 assert main((str(t_py), "--config", str(cfg))) == 1
141 out, err = capsys.readouterr()
142 assert out == f"{t_py}:1:1: ABC123 error\n"
143 assert err == ""
144
145
146def test_plugin_off_by_default(tmp_path, capsys):

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…