strike keyword argument in favour of new pytest.yield_fixture decorator

This commit is contained in:
holger krekel
2013-09-30 13:42:39 +02:00
parent 431ce79d94
commit 086d4e4ced
5 changed files with 44 additions and 29 deletions

View File

@@ -16,9 +16,12 @@ known incompatibilities:
new features:
- experimentally allow fixture functions to "yield" instead of "return"
a fixture value, allowing direct integration with with-context managers
in fixture functions and avoiding registration of finalization callbacks.
- experimentally introduce a new pytest.yield_fixture decorator which
has exactly the same parameters as pytest.fixture but expects
a ``yield`` statement instead of a ``return statement`` from fixture functions.
This allows direct integration with with-context managers
in fixture functions and generally avoids registering of finalization callbacks
in favour of treating the "after-yield" as teardown code.
Thanks Andreas Pelme, Vladimir Keleshev, Floris Bruynooghe, Ronny Pfannschmidt
and many others for discussions.