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

Function test_async_partial

tests/test__utils.py:24–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24def test_async_partial() -> None:
25 async def async_func(a: Any, b: Any) -> None: ... # pragma: no cover
26
27 def func(a: Any, b: Any) -> None: ... # pragma: no cover
28
29 partial = functools.partial(async_func, 1)
30 assert is_async_callable(partial)
31
32 partial = functools.partial(func, 1) # type: ignore
33 assert not is_async_callable(partial)
34
35
36def test_async_method() -> None:

Callers

nothing calls this directly

Calls 1

is_async_callableFunction · 0.90

Tested by

no test coverage detected