Coverage for tests/test_utils.py: 100%
6 statements
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-13 05:19 +0000
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-13 05:19 +0000
1from unittest.mock import AsyncMock 1abcdefghijklmnopqrst
3from fast_depends.utils import is_coroutine_callable 1abcdefghijklmnopqrst
6def test_is_coroutine_callable() -> None: 1abcdefghijklmnopqrst
7 async def coroutine_func() -> None: ... 1abcdefghijklmnopqrst
9 assert is_coroutine_callable(coroutine_func) 1abcdefghijklmnopqrst
11 def sync_func() -> None: ... 1abcdefghijklmnopqrst
13 assert not is_coroutine_callable(sync_func) 1abcdefghijklmnopqrst
15 assert is_coroutine_callable(AsyncMock()) 1abcdefghijklmnopqrst