Fix `maybe_override_capture` to not get invalid capX fixture names..
(cherry picked from commit 32e89c67ee)
testing_harness_infra
parent
dd1d6cd51e
commit
eb89db81a5
|
|
@ -831,13 +831,12 @@ def maybe_xfail_for_spawner(
|
||||||
def maybe_override_capture(
|
def maybe_override_capture(
|
||||||
request: pytest.FixtureRequest,
|
request: pytest.FixtureRequest,
|
||||||
start_method: bool,
|
start_method: bool,
|
||||||
):
|
) -> str:
|
||||||
if _is_forking_spawner(start_method):
|
if _is_forking_spawner(start_method):
|
||||||
return request.getfixturevalue('capsys')
|
request.getfixturevalue('capsys')
|
||||||
|
return 'sys'
|
||||||
|
|
||||||
return request.getfixturevalue(
|
return request.config.option.capture
|
||||||
request.config.option.capture
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue