From 6473c3d87e9cbcbf39976ee98a56bf620e848249 Mon Sep 17 00:00:00 2001 From: Duncan Betts Date: Mon, 28 Nov 2016 14:27:12 +0000 Subject: [PATCH] Improved description of functionality for Issue #687 --- CHANGELOG.rst | 3 +++ doc/en/fixture.rst | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 77b67ddbb..300812383 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,8 @@ * Add hint to error message hinting possible missing ``__init__.py`` (`#478`_). Thanks `@DuncanBetts`_. +* More accurately describe when fixture finalization occurs in documentation (`#687`_). Thanks `@DuncanBetts`_. + * Provide ``:ref:`` targets for ``recwarn.rst`` so we can use intersphinx referencing. Thanks to `@dupuy`_ for the report and `@lwm`_ for the PR. @@ -34,6 +36,7 @@ .. _@nmundar: https://github.com/nmundar .. _#478: https://github.com/pytest-dev/pytest/issues/478 +.. _#687: https://github.com/pytest-dev/pytest/issues/687 .. _#2034: https://github.com/pytest-dev/pytest/issues/2034 .. _#2038: https://github.com/pytest-dev/pytest/issues/2038 .. _#2078: https://github.com/pytest-dev/pytest/issues/2078 diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index b0595bc9d..510a4edf9 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -318,8 +318,7 @@ the ``with`` statement ends. request.addfinalizer(fin) return smtp # provide the fixture value - The ``fin`` function will execute when the last test using - the fixture in the module has finished execution. + The ``fin`` function will execute when the last test in the module has finished execution. This method is still fully supported, but ``yield`` is recommended from 2.10 onward because it is considered simpler and better describes the natural code flow.