Fix `maybe_override_capture` to not get invalid capX fixture names..
(cherry picked from commit 32e89c67ee)
wkt/tooling_enhancements_from_mtf_spawner
parent
a4f8496498
commit
6d94a67251
|
|
@ -662,13 +662,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