[TIP] addCleanup for setUpClass()?
tsp at apache.org
Thu Aug 1 02:23:51 PDT 2013
In unittest with the fix for  unittest.addCleanups can perform
cleanup for objects in the LIFO structure if setUp fails midway during
an expensive test. Is there something similar for setUpClass() as well
that was introduced with unittest2?
If not - would something like the following work?
A lot of our tests share resources created within setUpClass and it
would be useful to override addCleanup to perform such garbage
collection when setUpClass fails.
Powered by BigRock.com
More information about the testing-in-python