-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-28911: Clarify the behaviour of assert_called_once_with. #251
Conversation
@@ -303,14 +303,14 @@ the *new_callable* argument to :func:`patch`. | |||
|
|||
.. method:: assert_called_once_with(*args, **kwargs) | |||
|
|||
Assert that the mock was called exactly once and with the specified | |||
arguments. | |||
Assert that the mock was called exactly once and that that call was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"that that"? "that the call"? "that call"?
Sorry, english is not my first language, so I don't know if it's correct or not!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that it does look a bit weird at first, but it is acceptable English: http://english.stackexchange.com/questions/3418/how-do-you-handle-that-that-the-double-that-problem
It could be rephrased, but that would make it longer/more complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's a little awkward but totally fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem like reasonable clarifications to me, and the grammar is totally fine. 👍
@@ -303,14 +303,14 @@ the *new_callable* argument to :func:`patch`. | |||
|
|||
.. method:: assert_called_once_with(*args, **kwargs) | |||
|
|||
Assert that the mock was called exactly once and with the specified | |||
arguments. | |||
Assert that the mock was called exactly once and that that call was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's a little awkward but totally fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, @Lukasa confirmed that it's ok :-)
This PR should be backported to 3.6: @153957 can you write cherry-pick the fix and propose a PR for that? Use "git cherry-pick -x" |
Upstream fix for bpo-39386 broke Stackless test case test_pickle.TestAsyncGenPickling.
Upstream fix for bpo-39386 broke Stackless test case test_pickle.TestAsyncGenPickling. (cherry picked from commit c3f61b0)
No description provided.