diff --git a/_pytest/hookspec.py b/_pytest/hookspec.py index 417a9de56..f6fc4a8da 100644 --- a/_pytest/hookspec.py +++ b/_pytest/hookspec.py @@ -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): diff --git a/changelog/2698.doc b/changelog/2698.doc new file mode 100644 index 000000000..3088b6efc --- /dev/null +++ b/changelog/2698.doc @@ -0,0 +1 @@ +Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None. \ No newline at end of file