Art of Unit Testing

Björn Lindström bkhl at stp.lingfil.uu.se
Tue Aug 2 13:02:09 EDT 2005


Christoph Zwerschke <zwerschke at zuv.uni-heidelberg.de> writes:

> Would it make sense to add "globaleSetup" and "globalTearDown" methods
> to the TestCase class? I think at least it would not harm
> anybody. Where should such proposals be submitted?

In general that's not such a good idea. If you build your tests like
that, it gets hard to know which test really went wrong, and you might
get the situation where the whole set of tests works, but depend on each
other in some way. (This can also happen for more obscure reasons, and
is worth looking out for whichever way you do it.)

So, rebuilding the environment for the each before every single test is
generally worth the overhead.

-- 
Björn Lindström <bkhl at stp.lingfil.uu.se>
Student of computational linguistics, Uppsala University, Sweden



More information about the Python-list mailing list