Message85465
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. |
|
Date |
User |
Action |
Args |
2009-04-05 07:25:55 | ngie | set | recipients:
+ ngie, gregory.p.smith, pitrou, rbcollins, michael.foord |
2009-04-05 07:25:54 | ngie | set | messageid: <1238916354.62.0.874223291437.issue5679@psf.upfronthosting.co.za> |
2009-04-05 07:25:52 | ngie | link | issue5679 messages |
2009-04-05 07:25:51 | ngie | create | |
|