Single ``--version`` or ``-V`` should display only the pytest version, without loading plugins (#13574).
(pytester: Pytester, flag: str)
| 18 | |
| 19 | @pytest.mark.parametrize(class="st">"flag", [class="st">"--version", class="st">"-V"]) |
| 20 | def test_version_less_verbose(pytester: Pytester, flag: str) -> None: |
| 21 | class="st">""class="st">"Single ``--version`` or ``-V`` should display only the pytest version, without loading plugins (class="cm">#13574)."class="st">"" |
| 22 | pytester.makeconftest(class="st">"print(&class="cm">#x27;This should not be printed')") |
| 23 | result = pytester.runpytest_subprocess(flag) |
| 24 | assert result.ret == ExitCode.OK |
| 25 | assert result.stdout.str().strip() == fclass="st">"pytest {pytest.__version__}" |
| 26 | |
| 27 | |
| 28 | def test_versions() -> None: |
nothing calls this directly
no test coverage detected