setuponly: pytest_fixture_setup: use option directly

This commit is contained in:
Daniel Hahler 2019-10-20 17:57:25 +02:00
parent 83351a3368
commit a6152db84a
1 changed files with 1 additions and 2 deletions

View File

@ -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()).