STINNER Victor added the comment: >>> asyncio.iscoroutinefunction(unittest.mock.Mock()) <Mock name='mock._is_coroutine' id='4544068072'>
Yeah, I already had this issue when I wrote unit tests using mock :-/ I didn't find an obvious fix for this issue, and it's quite easy to workaround it. It looks like the "m._is_coroutine = False" is not used in asyncio tests. I don't recall how I worked around the issue in asyncio tests... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25599> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com