(self, val, tp, trace)
| 235 | self._patcher.__enter__() |
| 236 | |
| 237 | def __exit__(self, val, tp, trace): |
| 238 | self.stop() |
| 239 | if self._with_scopes and self._api_patcher is not None: |
| 240 | self._api_patcher.__exit__(val, tp, trace) |
| 241 | self._api_patcher = None |
| 242 | |
| 243 | def __call__(self, func): |
| 244 | func = super().__call__(func) |