[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-29 Thread Lisa Roach
Change by Lisa Roach : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-27 Thread Lisa Roach
Lisa Roach added the comment: New changeset 52bdd414ed9da7c62c312c542803753986a0040a by Lisa Roach in branch '3.8': [3.8] bpo-38136: Updates await_count and call_count to be different things (GH-16192) (GH-16431) https://github.com/python/cpython/commit/52bdd414ed9da7c62c312c542803753986a004

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-26 Thread Lisa Roach
Change by Lisa Roach : -- pull_requests: +16010 pull_request: https://github.com/python/cpython/pull/16431 ___ Python tracker ___ __

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-23 Thread Lisa Roach
Lisa Roach added the comment: New changeset ef048517755db1f0d211fb6dfc655a8b412cc96f by Lisa Roach in branch 'master': bpo-38136: Updates await_count and call_count to be different things (GH-16192) https://github.com/python/cpython/commit/ef048517755db1f0d211fb6dfc655a8b412cc96f --

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-16 Thread Lisa Roach
Change by Lisa Roach : -- keywords: +patch pull_requests: +15798 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16192 ___ Python tracker ___ _

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-12 Thread Lisa Roach
Lisa Roach added the comment: Going to try to recap an in-person conversation: There are some cases where calls are made separate from when they are awaited, for example: >>> call = foo() >>> await call This would be 1 call and 1 await: Call List Await List - -- [f

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-12 Thread Michael Foord
Michael Foord added the comment: I'm particularly concerned that we have call_count "sane" for AsyncMock and avoid adding "await_count" if possible. I think we've decided on that. I'm more agnostic on the assert_await* methods. I agree they're a nice API. I don't mind those staying but I als

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: IMO it gives a good segregation between other mocks and AsyncMock that using assert_awaited_* makes it explicit and to cause less confusion over whether this is an awaitable or a synchronous mock. I would favor in keeping the API. I also found it t

[issue38136] Remove AsyncMock.assert_awaited_*

2019-09-12 Thread Lisa Roach
New submission from Lisa Roach : 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, whic