Execute all cleanup functions. Normally called for you after tearDown.
(self)
| 695 | stopTestRun() |
| 696 | |
| 697 | def doCleanups(self): |
| 698 | """Execute all cleanup functions. Normally called for you after |
| 699 | tearDown.""" |
| 700 | outcome = self._outcome or _Outcome() |
| 701 | while self._cleanups: |
| 702 | function, args, kwargs = self._cleanups.pop() |
| 703 | with outcome.testPartExecutor(self): |
| 704 | self._callCleanup(function, *args, **kwargs) |
| 705 | |
| 706 | # return this for backwards compatibility |
| 707 | # even though we no longer use it internally |
| 708 | return outcome.success |
| 709 | |
| 710 | @classmethod |
| 711 | def doClassCleanups(cls): |