[docs] [issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError
Terry J. Reedy
report at bugs.python.org
Sat Jul 27 22:56:14 CEST 2013
Terry J. Reedy added the comment:
I re-ran with setUp 'raise' changed to 'pass' to see the effect of raise AssertionError or unittest.SkipTest in tearDown and indeed the test fails or skips even then. I suggest adding ', other than AssertionError or SkipTest,' just after 'method'. The same is true of test_xxx methods.
A slight anomaly is that AssertionError in test_nothing and SkipTest in tearDown results in "FAILED (failures=1, skipped=1)", which is not really a skip.
For setUpClass and setUpModule, AssertionErrors *are* errors, not failures, while SkipTest works everywhere.
versions: +Python 2.7, Python 3.3
Python tracker <report at bugs.python.org>
More information about the docs