[TIP] TestCase.debug doesn't run tearDown in the event of an error?
chris at simplistix.co.uk
Wed Jul 28 06:46:17 PDT 2010
I have some code, of which this is a minimal demonstration:
from unittest import TestCase
tests = Tests('test_method')
When test_method doesn't raise an exception, the tearDown is run.
However, in the above example, the tearDown is not run.
This is at odds with the normal unit test running experience.
Why does debug behave differently in this respect?
If it helps, this is on Python 2.5.2.
Simplistix - Content Management, Batch Processing & Python Consulting
More information about the testing-in-python