[Twisted-Python] trial setUp/tearDown behavior

Moof moof at metamoof.net
Wed Nov 16 07:57:45 MST 2005


Jonathan Lange wrote:
> It seems surprising that you chose this way of summarising.
> Rather, I'd say "It does not seem surprising that Trial shares state
> between test cases." / "It is surprising that Trial shares state
> between test cases"
> 
>> A main problem to coming to some agreement here seems to be that a lot of people are assuming they know how trial deals with shared state (or how trial should deal with shared state), but I haven't seen anyone explicitly spell this out yet.  Doing this might be a good first step to making further progress.
> 
> A worthy thought, and most likely right.

Put like that, my vote is fot xUnit (and everything else) convention of
using setUp and tearDown to set state for each test within a TestCase, and
setUpClass and tearDownClass to set state for the TestCase object.
setUpClass is not a pyUnit convention, but the various additions I've seen
all seem to implement it.

How many unit tests would be affected by such a change?

Moof
-- 
Giles Antonio Radford, alias Moof
"Too old to be a chicken and too young to be a dirty old man"
Serving up my ego over at <http://metamoof.net/>




More information about the Twisted-Python mailing list