MCPcopy
hub / github.com/encode/starlette / test_async_method

Function test_async_method

tests/test__utils.py:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def test_async_method() -> None:
37 class Async:
38 async def method(self) -> None: ... # pragma: no cover
39
40 class Sync:
41 def method(self) -> None: ... # pragma: no cover
42
43 assert is_async_callable(Async().method)
44 assert not is_async_callable(Sync().method)
45
46
47def test_async_object_call() -> None:

Callers

nothing calls this directly

Calls 3

is_async_callableFunction · 0.90
AsyncClass · 0.85
SyncClass · 0.85

Tested by

no test coverage detected