[New-bugs-announce] [issue38136] Remove AsyncMock.assert_awaited_*
report at bugs.python.org
Thu Sep 12 08:40:20 EDT 2019
New submission from Lisa Roach <lisaroach14 at gmail.com>:
After some discussion about call_count vs await_count, I believe call_count should be counting when things are *awaited* (await foo()), not when they are *called* (foo()).
I think people expect "calling" to execute the code and give them a return_value, which for asyncio is what happens when you await, not when you call with (). If people disagree about this I am open to discussion, we can change the current functionality and leave in the assert_awaited_* calls.
Currently the code does count asyncio calls when they are awaited, but this makes the assert_awaited_* calls redundant.
We should remove these in favor of the call_count_* functions.
components: Library (Lib)
nosy: cjw296, ezio.melotti, lisroach, michael.foord, xtreak
title: Remove AsyncMock.assert_awaited_*
versions: Python 3.8, Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce