Theron Luhn added the comment:
For me, the context is a test I was writing that went something like this:
>>> import asyncio
>>> from unittest.mock import Mock
>>> loop = asyncio.get_event_loop()
>>> blocking_func = Mock()
>>> loop.run_in_executo
New submission from Theron Luhn:
>>> asyncio.iscoroutinefunction(unittest.mock.Mock())
This is an unexpected response, both in type (Mock rather than boolean) and
value (truthy).
inspect.iscoroutinefunction behaves as expected.
Workaround:
>>> m = unittest.mock.Mock()
&