Re: Art of Unit Testing
- From: "John Roth" <newsgroups@xxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 11:58:35 -0600
""Björn Lindström"" <bkhl@xxxxxxxxxxxxxxxxx> wrote in message news:87mzo0s25q.fsf@xxxxxxxxxxxxxxxxxx
Christoph Zwerschke <zwerschke@xxxxxxxxxxxxxxxxxxxxx> 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.
Generally is not always. There are configuration issues that are best dealt with once at the beginning of the test, and once at the end, and that have absolutely nothing to do with the order in which each elementary test runs.
When your customers keep asking for something, and you keep telling them that they really don't want what they're asking for, who's lisening, and who's being stubborn?
John Roth Python Fit.
--
Björn Lindström <bkhl@xxxxxxxxxxxxxxxxx>
Student of computational linguistics, Uppsala University, Sweden
.
- References:
- Art of Unit Testing
- From: Christoph Zwerschke
- Re: Art of Unit Testing
- From: Björn Lindström
- Art of Unit Testing
- Prev by Date: Re: Dabo in 30 seconds?
- Next by Date: Re: py2exe windows apps path question
- Previous by thread: Re: Art of Unit Testing
- Next by thread: Re: Art of Unit Testing
- Index(es):
Relevant Pages
|