summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/case.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/case.py')
-rw-r--r--Lib/unittest/case.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index d048303..91c4fbe 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -389,6 +389,9 @@ class TestCase(object):
self.setUp()
getattr(self, self._testMethodName)()
self.tearDown()
+ while self._cleanups:
+ function, args, kwargs = self._cleanups.pop(-1)
+ function(*args, **kwargs)
def skipTest(self, reason):
"""Skip this test."""