(tmp_path, capsys)
| 144 | |
| 145 | |
| 146 | def test_plugin_off_by_default(tmp_path, capsys): |
| 147 | cfg_s = f"""\ |
| 148 | [flake8:local-plugins] |
| 149 | extension = |
| 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 | |
| 170 | def yields_physical_line(physical_line): |
nothing calls this directly
no test coverage detected
searching dependent graphs…