Execute all module cleanup functions. Normally called for you after tearDownModule.
()
| 139 | |
| 140 | |
| 141 | def doModuleCleanups(): |
| 142 | """Execute all module cleanup functions. Normally called for you after |
| 143 | tearDownModule.""" |
| 144 | exceptions = [] |
| 145 | while _module_cleanups: |
| 146 | function, args, kwargs = _module_cleanups.pop() |
| 147 | try: |
| 148 | function(*args, **kwargs) |
| 149 | except Exception as exc: |
| 150 | exceptions.append(exc) |
| 151 | if exceptions: |
| 152 | raise ExceptionGroup('module cleanup failed', exceptions) |
| 153 | |
| 154 | |
| 155 | def skip(reason): |