(self, func)
| 1443 | |
| 1444 | |
| 1445 | def decorate_async_callable(self, func): |
| 1446 | # NB. Keep the method in sync with decorate_callable() |
| 1447 | if hasattr(func, 'patchings'): |
| 1448 | func.patchings.append(self) |
| 1449 | return func |
| 1450 | |
| 1451 | @wraps(func) |
| 1452 | async def patched(*args, **keywargs): |
| 1453 | with self.decoration_helper(patched, |
| 1454 | args, |
| 1455 | keywargs) as (newargs, newkeywargs): |
| 1456 | return await func(*newargs, **newkeywargs) |
| 1457 | |
| 1458 | patched.patchings = [self] |
| 1459 | return patched |
| 1460 | |
| 1461 | |
| 1462 | def get_original(self): |