(self, func, /, *args, **kwargs)
| 123 | ) |
| 124 | |
| 125 | def _callMaybeAsync(self, func, /, *args, **kwargs): |
| 126 | assert self._asyncioRunner is not None, 'asyncio runner is not initialized' |
| 127 | if inspect.iscoroutinefunction(func): |
| 128 | return self._asyncioRunner.run( |
| 129 | func(*args, **kwargs), |
| 130 | context=self._asyncioTestContext, |
| 131 | ) |
| 132 | else: |
| 133 | return self._asyncioTestContext.run(func, *args, **kwargs) |
| 134 | |
| 135 | def _setupAsyncioRunner(self): |
| 136 | assert self._asyncioRunner is None, 'asyncio runner is already initialized' |
no test coverage detected