[TIP] py.test deprecating yield tests

oliver oliver.schoenborn at gmail.com
Sat Dec 10 05:55:49 PST 2016


I would like to know if I need to look into this deprecation further: We
use yield in fixtures but that's different from "yield tests" right?

On Wed, Dec 7, 2016, 3:56 PM Ronny Pfannschmidt <
opensource at ronnypfannschmidt.de> wrote:

> Hi Randy,
>
> the Problem with yield tests is, that they execute test code and setup
> state at collection time, wich is a massive source of errors in any
> complex case and just barely works in the simple case
>
> back when py.test collected and executed tests as it discovered them,
> that was fine, but its been quite a while now since py.test switched to
> collect first, then execute (around the 2.0 release i think)
>
> -- Ronny
>
>
> Am Wed, 7 Dec 2016 15:32:12 -0500
> schrieb Randy Syring <randy at thesyrings.us>:
>
> > I recently received a bunch of warnings that py.test is deprecating
> > yield tests.  I found this PR:
> >
> > https://github.com/pytest-dev/pytest/pull/1714
> >
> > But there is no real commentary there about why they are being
> > removed (other than they are "problematic") and what should be done
> > to replace them.  I'm not really sure if this is problem for us or
> > not, I'm currently going to just call the methods myself instead of
> > yielding them.  But wondered if there was anyone else who has further
> > insight into this decision who can comment.
> >
> > Thanks.
> >
> > *Randy Syring*
> > Husband | Father | Redeemed Sinner
> >
> > /"For what does it profit a man to gain the whole world
> > and forfeit his soul?" (Mark 8:36 ESV)/
> >
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
-- 
Oliver
My StackOverflow contributions
My CodeProject articles
My Github projects
My SourceForget.net projects
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20161210/5d9d9d7d/attachment.html>


More information about the testing-in-python mailing list