Skip to content

Commit

Permalink
Also update yield teardown for Issue pytest-dev#687
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarh authored Nov 29, 2016
1 parent 8208a77 commit 7c13995
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/en/fixture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ the code after the *yield* statement serves as the teardown code.::
print("teardown smtp")
smtp.close()

The ``print`` and ``smtp.close()`` statements will execute when the last test using
the fixture in the module has finished execution, regardless of the exception status of the tests.
The ``print`` and ``smtp.close()`` statements will execute when the last test in
the module has finished execution, regardless of the exception status of the
tests.

Let's execute it::

Expand Down

0 comments on commit 7c13995

Please sign in to comment.