(self, func)
| 1436 | |
| 1437 | |
| 1438 | def decorate_async_callable(self, func): |
| 1439 | # NB. Keep the method in sync with decorate_callable() |
| 1440 | if hasattr(func, 'patchings'): |
| 1441 | func.patchings.append(self) |
| 1442 | return func |
| 1443 | |
| 1444 | @wraps(func) |
| 1445 | async def patched(*args, **keywargs): |
| 1446 | with self.decoration_helper(patched, |
| 1447 | args, |
| 1448 | keywargs) as (newargs, newkeywargs): |
| 1449 | return await func(*newargs, **newkeywargs) |
| 1450 | |
| 1451 | patched.patchings = [self] |
| 1452 | return patched |
| 1453 | |
| 1454 | |
| 1455 | def get_original(self): |