MCPcopy Index your code
hub / github.com/python/cpython / _callMaybeAsync

Method _callMaybeAsync

Lib/unittest/async_case.py:125–133  ·  view source on GitHub ↗
(self, func, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

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'

Callers 2

_callTestMethodMethod · 0.95
_callCleanupMethod · 0.95

Calls 2

funcFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected