(tmp_path, capsys)
| 126 | |
| 127 | |
| 128 | def test_plugin_gets_enabled_by_default(tmp_path, capsys): |
| 129 | cfg_s = f"""\ |
| 130 | [flake8:local-plugins] |
| 131 | extension = |
| 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 | |
| 146 | def test_plugin_off_by_default(tmp_path, capsys): |
nothing calls this directly
no test coverage detected
searching dependent graphs…