Author yaneurabeya
Recipients gregory.p.smith, michael.foord, pitrou, rbcollins, yaneurabeya
Date 2009-04-05.07:25:50
SpamBayes Score 1.94289e-15
Marked as misclassified No
Message-id <1238916354.62.0.874223291437.issue5679@psf.upfronthosting.co.za>
In-reply-to
Content
I think some perspective is required on this enhancement request. I
originally filed this issue -- http://bugs.python.org/issue5538 --
because of the unneeded complexity involved with duplicating
teardown-related code in setUp because of a step in setUp failing.

From my perspective, there are two issues:

- setUp failing doesn't cleanup on failure unless the test writer
explicitly adds cleanup logic.
- cleanup shouldn't partially replace tearDown -- either supplement it
or completely replace it longterm. Otherwise the unittest code and
expectations associated with it will potentially confuse end users.

Another thought: Why not have an option for defining a method called
`incrementalTearDown', which replaces `tearDown' from a functional
standpoint? A method like that would clearly convey that this is
designed to replace tearDown, it's not the same functionally, and would
ease migration over the long-term if people chose to use this design
when writing testcases.

I personally think that doing something like this would be trivial (yet
novel) functionality as it makes more sense than the current
implementation of setUp->test->tearDown.
History
Date User Action Args
2009-04-05 07:25:55yaneurabeyasetrecipients: + yaneurabeya, gregory.p.smith, pitrou, rbcollins, michael.foord
2009-04-05 07:25:54yaneurabeyasetmessageid: <1238916354.62.0.874223291437.issue5679@psf.upfronthosting.co.za>
2009-04-05 07:25:52yaneurabeyalinkissue5679 messages
2009-04-05 07:25:51yaneurabeyacreate