From dff914cadda7745b2d4af055d64af14fb514fc40 Mon Sep 17 00:00:00 2001 From: Omar Kohl Date: Sun, 20 Mar 2016 14:10:20 +0100 Subject: [PATCH] Add short explanation and link to yield fixtures in fixture doc --- doc/en/fixture.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index 1c7fc3482..4e302b758 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -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 `. + + .. _`request-context`: Fixtures can introspect the requesting test context