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