[TIP] cleanUp for unittest
Fred Drake
fdrake at gmail.com
Fri Apr 3 12:14:27 PDT 2009
The zope.testing package provides a setupstack module that provides
support for this (though with the clunky constraint that the cleanup
function that calls the stacked cleanups has to be arranged for).
Having a way to support this functional behavior as part of the
standard TestCase class would be a substantial improvement over the
current situation. There should be a method to add a cleanup function
and another to call them at the end as part of the base
implementation.
If someone wants to handle the implementation of those differently,
they can use subclass TestCase and use that instead where it matters.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller
More information about the testing-in-python
mailing list