Skip to content

Commit 968510b

Browse files
committed
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.
1 parent 5782aab commit 968510b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/test_terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ def test_failure():
18021802

18031803
@pytest.fixture(scope="session")
18041804
def tr() -> TerminalReporter:
1805-
config = _pytest.config._prepareconfig()
1805+
config = _pytest.config._prepareconfig([])
18061806
return TerminalReporter(config)
18071807

18081808

0 commit comments

Comments
 (0)