Add short explanation and link to yield fixtures in fixture doc

This commit is contained in:
Omar Kohl 2016-03-20 14:10:20 +01:00
parent 3135463573
commit dff914cadd
1 changed files with 8 additions and 0 deletions

View File

@ -283,6 +283,14 @@ module itself does not need to change or know about these details
of fixture setup.
Finalization/teardown with yield fixtures
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Another alternative to the *request.addfinalizer()* method is to use *yield
fixtures*. All the code after the *yield* statement serves as the teardown
code. See the :ref:`yield fixture documentation <yieldfixture>`.
.. _`request-context`:
Fixtures can introspect the requesting test context