-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncMock add .awaited
like .called
#82342
Comments
Currently Mock has a |
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. |
Yeah I think the current >>> mock = AsyncMock()
>>> cr_mock = mock()
>>> mock.called
True
>>> mock.awaited
False
>>> await cr_mock
>>> mock.awaited
True |
Looking at this more, I think I want to just remove the current But I have issue with the naming (await_event is probably better for us), and I'm not sure how to document it well and ensure it's well tested. With the 3.8 release coming up fast I'd rather remove it for now and then add it back in after some more thought has been given to the feature, instead of getting stuck with a not fully thought out attribute we have to worry about deprecating. |
Lisa retargeted this issue to instead remove the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: