MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _callMaybeAsync

Method _callMaybeAsync

test/__init__.py:891–895  ·  view source on GitHub ↗
(self, func, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

889 return get_loop().run_until_complete(func(*args, **kwargs))
890
891 def _callMaybeAsync(self, func, /, *args, **kwargs):
892 if inspect.iscoroutinefunction(func):
893 return get_loop().run_until_complete(func(*args, **kwargs))
894 else:
895 return func(*args, **kwargs)
896
897 def assertEqualCommand(self, expected, actual, msg=None):
898 self.assertEqual(sanitize_cmd(expected), sanitize_cmd(actual), msg)

Callers 2

_callTestMethodMethod · 0.95
_callCleanupMethod · 0.95

Calls 1

get_loopFunction · 0.70

Tested by

no test coverage detected