[TIP] always call teardownX even if setupX fails?
Doug Hellmann
doug.hellmann at gmail.com
Sat Jan 23 07:47:13 PST 2010
On Jan 23, 2010, at 5:51 AM, Robert Collins wrote:
> On Sat, 2010-01-23 at 00:43 +0100, holger krekel wrote:
>>
>> Doesn't look like a blocker to me at the moment. What do you think?
>> Any objections or recommendations? Do you regard consistency a
>> blocker?
>
> Trial and testtools run tearDown unconditionally even though its
> inconsistent with unittest. I'm a big fan of doing that, and encourage
> you to do it in py.test.
+1
Any test with moderately complex external fixtures would benefit from
this behavior. We use a subclass of unittest.TestCase that always
calls tearDown() for all of our tests at Racemi.
Doug
More information about the testing-in-python
mailing list