testing: fix isolation issue in `tr` fixture

The default for `_prepareconfig` is to use `sys.argv`, which in this
case are the flags passed to (top-level) `pytest`. This is not the
intention, the tests themselves should not be affected by it.
This commit is contained in:
Ran Benita 2023-11-28 19:54:24 +02:00
parent 5782aab017
commit 968510b6aa
1 changed files with 1 additions and 1 deletions

View File

@ -1802,7 +1802,7 @@ def test_terminal_no_summary_warnings_header_once(pytester: Pytester) -> None:
@pytest.fixture(scope="session")
def tr() -> TerminalReporter:
config = _pytest.config._prepareconfig()
config = _pytest.config._prepareconfig([])
return TerminalReporter(config)