[TIP] TestCase.debug doesn't run tearDown in the event of an error?
Chris Withers
chris at simplistix.co.uk
Wed Jul 28 07:04:24 PDT 2010
Michael Foord wrote:
> test = TheTestCase('methodName')
> try:
> test.debug()
> except Exception:
> test.tearDown()
> raise
>
> A bit ungainly, sorry. I'm not really a fan of the debug method *anyway*
> but calling the tearDown on fail / exception would be a big semantic
> change.
Indeed, that's what we're doing. I would prefer us to be doing something
more elegant.
So, I'm looking for methods other than debug, especially if you're not a
fan ;-)
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the testing-in-python
mailing list