From 30260361dd6b37510c702e8a68506db5e3507cb3 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 3 Apr 2015 16:55:10 -0300 Subject: [PATCH] Reviewed wording about yield being a "new" feature --HG-- branch : yield-experimental-docs --- doc/en/yieldfixture.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/yieldfixture.txt b/doc/en/yieldfixture.txt index ef45970b4..b3a140c1d 100644 --- a/doc/en/yieldfixture.txt +++ b/doc/en/yieldfixture.txt @@ -11,7 +11,7 @@ pytest-2.4 allows fixture functions to seamlessly use a ``yield`` instead of a ``return`` statement to provide a fixture value while otherwise fully supporting all other fixture features. -Let's look at a simple standalone-example using the new ``yield`` syntax:: +Let's look at a simple standalone-example using the ``yield`` syntax:: # content of test_yield.py @@ -64,9 +64,9 @@ The file ``f`` will be closed after the test finished execution because the Python ``file`` object supports finalization when the ``with`` statement ends. -Note that the new syntax is fully integrated with using ``scope``, -``params`` and other fixture features. Changing existing -fixture functions to use ``yield`` is thus straight forward. +Note that the yield fixture form supports all other fixture +features such as ``scope``, ``params``, etc., thus changing existing +fixture functions to use ``yield`` is straight forward. Discussion and future considerations / feedback ++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -106,7 +106,7 @@ However, there are also limitations or foreseeable irritations: - lastly ``yield`` introduces more than one way to write fixture functions, so what's the obvious way to a newcomer? Newcomers reading the docs will see feature examples using the - ``return`` style so should use that, if in doubt. + ``return`` style so should use that, if in doubt. Others can start experimenting with writing yield-style fixtures and possibly help evolving them further.