This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lisroach
Recipients cjw296, lisroach, mariocj89, michael.foord, xtreak
Date 2019-09-09.09:55:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568022922.84.0.738410307269.issue37383@roundup.psfhosted.org>
In-reply-to
Content
I see your point it is confusing the difference between the async and sync API, but I think the current AsyncMock call check is correct. According to the asyncio docs: "...simply calling a coroutine will not schedule it to be executed" (https://docs.python.org/3/library/asyncio-task.html#coroutines) and it goes on to say you either need to call the function with await, asyncio.run(), or asyncio.create_task(). 

So I believe calling an AsyncMock without using await should not log as a call, it is only if one of the three criteria above is met that it should be added to the mock_calls list.
History
Date User Action Args
2019-09-09 09:55:22lisroachsetrecipients: + lisroach, cjw296, michael.foord, mariocj89, xtreak
2019-09-09 09:55:22lisroachsetmessageid: <1568022922.84.0.738410307269.issue37383@roundup.psfhosted.org>
2019-09-09 09:55:22lisroachlinkissue37383 messages
2019-09-09 09:55:22lisroachcreate