[TIP] yield-tests and fixtures: should they have a future?
jpellerin at gmail.com
Fri Dec 21 06:37:31 PST 2012
Hi folks & Holger,
On Fri, Dec 21, 2012 at 4:51 AM, holger krekel <holger at merlinux.eu> wrote:
> However, some people expect fixtures/setup_function/method functions to
> before the generator does and this mixes the collection with the runtest
> Unfortunately, nose also supports this notion although i am wondering how
> nose2 is going to deal with it as Jason also plans to separate collection
> from running.
nose2 does separate collection from running and breaks backwards
compatibility with nose's generator tests. This can be pretty surprising in
some cases, if you're using generator tests in a test class and you expect
to be able to use instance attributes set in setUp in the generator
function -- you can't. That's currently filed as a bug against nose2, but
I'm coming around to thinking that it's just the way the design has to
work. So I guess that would be my opinion -- there's no need to preserve
compatibility with nose.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python