Back to Pytest

"yield_fixture" functions

doc/en/yieldfixture.rst

9.1.0.dev0471 B
Original Source

:orphan:

.. _yieldfixture:

"yield_fixture" functions

.. important:: Since pytest-3.0, fixtures using the normal fixture decorator can use a yield statement to provide fixture values and execute teardown code, exactly like yield_fixture in previous versions.

Marking functions as ``yield_fixture`` is still supported, but deprecated and should not
be used in new code.