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

Function test_async_object_call

tests/test__utils.py:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def test_async_object_call() -> None:
48 class Async:
49 async def __call__(self) -> None: ... # pragma: no cover
50
51 class Sync:
52 def __call__(self) -> None: ... # pragma: no cover
53
54 assert is_async_callable(Async())
55 assert not is_async_callable(Sync())
56
57
58def test_async_partial_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