You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances #84753
Activity
graingert commentedon Jun 21, 2022
looks like this issue is because
mock.AsyncMock()doesn't passinspect.isfunction:gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (#94050
pythongh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (
pythongh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (
gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (GH-…
ambv commentedon Jun 30, 2022
Fixed with #94050 and backported to 3.10 and 3.11. Thanks! ✨ 🍰 ✨
gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (GH-…
pythongh-84753: Clarify change made to `inspect` functions
pythongh-84753: Clarify change made to `inspect` functions (pythonGH-…
gh-84753: Clarify change made to `inspect` functions (#94554)
gh-84753: Clarify change made to `inspect` functions (GH-94554) (GH-9…
pythongh-84753: Clarify change made to `inspect` functions (pythonGH-…
gh-84753: Clarify change made to `inspect` functions (GH-94554) (GH-9…
Reword duck-type wording and finish the sentences