test_ok1/doc/en/yieldfixture.rst

19 lines
512 B
ReStructuredText
Raw Normal View History

:orphan:
.. _yieldfixture:
"yield_fixture" functions
---------------------------------------------------------------
2016-07-13 08:02:40 +08:00
.. deprecated:: 3.0
.. versionadded:: 2.4
.. important::
2016-07-13 08:02:40 +08:00
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.