From 5b3e2d94f8e1127d229e4a68116a60fbe64a8816 Mon Sep 17 00:00:00 2001 From: aizpurua23a <57321880+aizpurua23a@users.noreply.github.com> Date: Tue, 26 Jul 2022 21:30:07 +0200 Subject: [PATCH] Revert minor fixtures.rst edits. --- doc/en/how-to/fixtures.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index 899474b88..edac320ab 100644 --- a/doc/en/how-to/fixtures.rst +++ b/doc/en/how-to/fixtures.rst @@ -680,6 +680,8 @@ So to make sure we don't run the finalizer code when we wouldn't need to, we would only add the finalizer once the fixture would have done something that we'd need to teardown. +Here's how the previous example would look using the ``addfinalizer`` method: + .. code-block:: python # content of test_emaillib.py @@ -727,7 +729,6 @@ we'd need to teardown. assert email in receiving_user.inbox -Here's how the previous example would look using the ``addfinalizer`` method: It's a bit longer than yield fixtures and a bit more complex, but it does offer some nuances for when you're in a pinch.