From 6558c7245fe5d41f2909eaf876ad846226e6686d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 3 Apr 2015 19:44:06 -0300 Subject: [PATCH] Brought back discussion session Reworded it a bit to bring it to par with the current status --HG-- branch : yield-experimental-docs --- doc/en/yieldfixture.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/en/yieldfixture.txt b/doc/en/yieldfixture.txt index e108a5324..0fc7b5099 100644 --- a/doc/en/yieldfixture.txt +++ b/doc/en/yieldfixture.txt @@ -78,3 +78,23 @@ fixture functions to use ``yield`` is straightforward. This behaviour makes sense if you consider that many different test functions might use a module or session scoped fixture. + +Discussion and future considerations / feedback +++++++++++++++++++++++++++++++++++++++++++++++++++++ + +There are some topics that are worth mentioning: + +- usually ``yield`` is used for producing multiple values. + But fixture functions can only yield exactly one value. + Yielding a second fixture value will get you an error. + It's possible we can evolve pytest to allow for producing + multiple values as an alternative to current parametrization. + For now, you can just use the normal + :ref:`fixture parametrization ` + mechanisms together with ``yield``-style fixtures. + +- lastly ``yield`` introduces more than one way to write + fixture functions, so what's the obvious way to a newcomer? + +If you want to feedback or participate in discussion of the above +topics, please join our :ref:`contact channels`, you are most welcome.