Message254457
>>> asyncio.iscoroutinefunction(unittest.mock.Mock())
<Mock name='mock._is_coroutine' id='4544068072'>
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()
>>> m._is_coroutine = False
>>> asyncio.iscoroutinefunction(m)
False |
|
Date |
User |
Action |
Args |
2015-11-10 17:26:22 | luhn | set | recipients:
+ luhn, gvanrossum, vstinner, yselivanov |
2015-11-10 17:26:22 | luhn | set | messageid: <1447176382.09.0.498269327302.issue25599@psf.upfronthosting.co.za> |
2015-11-10 17:26:22 | luhn | link | issue25599 messages |
2015-11-10 17:26:21 | luhn | create | |
|