From a6152db84adfb7e9b64c16826aad73d5be91cb28 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 20 Oct 2019 17:57:25 +0200 Subject: [PATCH] setuponly: pytest_fixture_setup: use option directly --- src/_pytest/setuponly.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_pytest/setuponly.py b/src/_pytest/setuponly.py index 70d6ed12f..13c2886bb 100644 --- a/src/_pytest/setuponly.py +++ b/src/_pytest/setuponly.py @@ -22,8 +22,7 @@ def pytest_addoption(parser): @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup(fixturedef, request): yield - config = request.config - if config.option.setupshow: + if request.config.option.setupshow: if hasattr(request, "param"): # Save the fixture parameter so ._show_fixture_action() can # display it now and during the teardown (in .finish()).