Merge pull request #3135 from brianmaissy/doc/clarify_pytest_fixture_setup_with_fixture_that_returns_None

Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None
This commit is contained in:
Bruno Oliveira 2018-01-22 18:02:33 -02:00 committed by GitHub
commit 0d96a5bf90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -373,7 +373,15 @@ def pytest_runtest_logreport(report):
def pytest_fixture_setup(fixturedef, request):
""" performs fixture setup execution.
Stops at first non-None result, see :ref:`firstresult` """
:return: The return value of the call to the fixture function
Stops at first non-None result, see :ref:`firstresult`
.. note::
If the fixture function returns None, other implementations of
this hook function will continue to be called, according to the
behavior of the :ref:`firstresult` option.
"""
def pytest_fixture_post_finalizer(fixturedef, request):

1
changelog/2698.doc Normal file
View File

@ -0,0 +1 @@
Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None.