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

Add example to the documentation for calling unittest.mock.patch with create=True #11056

Merged
merged 1 commit into from
Jan 9, 2019

Conversation

pablogsal
Copy link
Member

Some users are confused with the description of create=True in the unittest.mock documentation, especially if they don't exactly understand entirely how patch works or if they have never tried to patch a non-existing attribute.

This PR clarifies a bit the documentation and sets an example on when is needed at the end of the section.

@pablogsal
Copy link
Member Author

CC: @mariocj89

Copy link
Contributor

@mariocj89 mariocj89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though not an English native speaker.

@pganssle
Copy link
Member

pganssle commented Jan 2, 2019

No problems with the English.

@pablogsal pablogsal merged commit d6acf17 into python:master Jan 9, 2019
@pablogsal pablogsal deleted the set_example_on_exists branch January 9, 2019 21:43
@miss-islington
Copy link
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-11484 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 9, 2019
… create=True (pythonGH-11056)

(cherry picked from commit d6acf17)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
miss-islington added a commit that referenced this pull request Jan 9, 2019
… create=True (GH-11056)

(cherry picked from commit d6acf17)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
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 skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants