[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-29 Thread Lisa Roach
Lisa Roach added the comment: New changeset 36e7e4aabb662e86e9dace1a6447492f45868654 by Lisa Roach (Miss Islington (bot)) in branch '3.8': bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443) (GH-16481) https://github.com/python/cpython/commit/36e7e4aabb662e86e9dace1a6447492f45868654

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +16065 pull_request: https://github.com/python/cpython/pull/16481 ___ Python tracker ___

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-29 Thread Lisa Roach
Lisa Roach added the comment: New changeset 25e115ec00b5f75e3589c9f21013c47c21e1753f by Lisa Roach in branch 'master': bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443) https://github.com/python/cpython/commit/25e115ec00b5f75e3589c9f21013c47c21e1753f --

[issue38161] AsyncMock add `.awaited` like `.called`

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

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-27 Thread Lisa Roach
Lisa Roach added the comment: Looking at this more, I think I want to just remove the current `awaited` object. The PR in asyntest makes it seem pretty cool: https://github.com/Martiusweb/asynctest/issues/64 But I have issue with the naming (await_event is probably better for us), and I'm

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-19 Thread Lisa Roach
Lisa Roach added the comment: Yeah I think the current `awaited` ought to at least be a private variable, since people will assume it works like a boolean to match `.called`. Then we could add a new, proper, `awaited` that would function like: >>> mock = AsyncMock() >>> cr_mock = mock() >>>

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: awaited is now initialized with an Event object. Do you had any use case in mind while designing it? I think it's a good choice to have True/False instead of being used to give an Event object that is not used. -- nosy: +xtreak type: ->

[issue38161] AsyncMock add `.awaited` like `.called`

2019-09-13 Thread Lisa Roach
New submission from Lisa Roach : Currently Mock has a `.called` attribute, we could add an equivalent `.awaited` that returns True or False if the object has been awaited on. -- messages: 352345 nosy: lisroach priority: normal severity: normal status: open title: AsyncMock add