116
117
return _do_with_cleanups(
117
118
self.cleanups, self.func, self, *args, **kwargs)
122
self.cleanups, self.func, *args, **kwargs)
120
129
def _do_with_cleanups(cleanup_funcs, func, *args, **kwargs):
121
130
"""Run `func`, then call all the cleanup_funcs.