Skip to content

[3.10] gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (GH-94050)#94461

Merged
ambv merged 1 commit intopython:3.10from
miss-islington:backport-4261b6b-3.10
Jun 30, 2022
Merged

[3.10] gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (GH-94050)#94461
ambv merged 1 commit intopython:3.10from
miss-islington:backport-4261b6b-3.10

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 30, 2022

The inspect version was not working with unittest.mock.AsyncMock.

The fix introduces special-casing of AsyncMock in
inspect.iscoroutinefunction equivalent to the one
performed in asyncio.iscoroutinefunction.

Co-authored-by: Łukasz Langa lukasz@langa.pl
(cherry picked from commit 4261b6b)

Co-authored-by: Mehdi ABAAKOUK sileht@sileht.net

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants