Skip to content
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

Merged
merged 1 commit into from
Feb 23, 2017
Merged

bpo-28911: Clarify the behaviour of assert_called_once_with. #251

merged 1 commit into from
Feb 23, 2017

Conversation

153957
Copy link
Contributor

@153957 153957 commented Feb 23, 2017

No description provided.

@@ -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
Copy link
Member

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!

Copy link
Contributor Author

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.

Copy link

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.

Copy link

@Lukasa Lukasa left a 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
Copy link

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.

Copy link
Member

@vstinner vstinner left a 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 :-)

@vstinner vstinner merged commit 324c5d8 into python:master Feb 23, 2017
@vstinner
Copy link
Member

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"

@vstinner vstinner added the docs Documentation in the Doc dir label Feb 23, 2017
akruis pushed a commit to akruis/cpython that referenced this pull request May 21, 2021
Upstream fix for bpo-39386 broke Stackless test case
test_pickle.TestAsyncGenPickling.
akruis pushed a commit to akruis/cpython that referenced this pull request Aug 11, 2021
Upstream fix for bpo-39386 broke Stackless test case
test_pickle.TestAsyncGenPickling.

(cherry picked from commit c3f61b0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants