Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _make_asyncio_fixture_function(


def _is_coroutine_or_asyncgen(obj: Any) -> bool:
return asyncio.iscoroutinefunction(obj) or inspect.isasyncgenfunction(obj)
return inspect.iscoroutinefunction(obj) or inspect.isasyncgenfunction(obj)


def _get_asyncio_mode(config: Config) -> Mode:
Expand Down Expand Up @@ -447,7 +447,7 @@ class Coroutine(PytestAsyncioFunction):
@staticmethod
def _can_substitute(item: Function) -> bool:
func = item.obj
return asyncio.iscoroutinefunction(func)
return inspect.iscoroutinefunction(func)

def runtest(self) -> None:
self.obj = wrap_in_sync(
Expand Down Expand Up @@ -512,7 +512,7 @@ def _can_substitute(item: Function) -> bool:
return (
getattr(func, "is_hypothesis_test", False) # type: ignore[return-value]
and getattr(func, "hypothesis", None)
and asyncio.iscoroutinefunction(func.hypothesis.inner_test)
and inspect.iscoroutinefunction(func.hypothesis.inner_test)
)

def runtest(self) -> None:
Expand Down