This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients michael.foord
Date 2009-04-03.19:56:45
SpamBayes Score 1.0443634e-09
Marked as misclassified No
Message-id <>
Proposal to add a cleanUp stack to unittest.TestCase. This is a list of
callables to be called (LIFO) to cleanup resources. If there are items
on the stack it should be called even if setUp fails. Otherwise it
should be called after tearDown.

Similar functionality is in the testing frameworks used by bzr, Twisted,
and Zope.

I will create a patch similar to the bzr implementation.

The public API is via a new method:

    def addCleanUpItem(self, callable, *args, **kwargs):

Usage is:

    self.db = self.createDB()
Date User Action Args
2009-04-03 19:56:48michael.foordsetrecipients: + michael.foord
2009-04-03 19:56:47michael.foordsetmessageid: <>
2009-04-03 19:56:46michael.foordlinkissue5679 messages
2009-04-03 19:56:45michael.foordcreate