From 968510b6aa69e2616828f643f6f2384e27f1ceb1 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 28 Nov 2023 19:54:24 +0200 Subject: [PATCH] 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. --- testing/test_terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 596c3c67e..264ab96d8 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -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)