From ce289bbed12016eb2ef019edd11fe7743ada356d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 15 Dec 2023 16:22:53 -0800 Subject: [PATCH] get capman conditionally --- conftest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conftest.py b/conftest.py index acb1a81c86..6792bd0c3d 100644 --- a/conftest.py +++ b/conftest.py @@ -15,9 +15,8 @@ def pytest_sessionstart(session): @pytest.hookimpl(hookwrapper=True, trylast=True) def pytest_runtest_call(item): # ensure we run as a hook after capturemanager's - capmanager = item.config.pluginmanager.getplugin("capturemanager") - if item.get_closest_marker("nocapture") is not None: + capmanager = item.config.pluginmanager.getplugin("capturemanager") with capmanager.global_and_fixture_disabled(): yield else: