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: