Minor: help / direct usage of config (#6011)

Minor: help / direct usage of config
This commit is contained in:
Bruno Oliveira 2019-10-22 20:24:08 -03:00 committed by GitHub
commit 215be88fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -20,8 +20,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()).

View File

@ -42,7 +42,7 @@ def pytest_addoption(parser):
type="linelist",
help="Each line specifies a pattern for "
"warnings.filterwarnings. "
"Processed after -W and --pythonwarnings.",
"Processed after -W/--pythonwarnings.",
)