Skip to content

bpo-36366: Return None on stopping unstarted patch object#12472

Merged
miss-islington merged 3 commits into
python:masterfrom
tirkarthi:bpo36366
Mar 28, 2019
Merged

bpo-36366: Return None on stopping unstarted patch object#12472
miss-islington merged 3 commits into
python:masterfrom
tirkarthi:bpo36366

Conversation

@tirkarthi

@tirkarthi tirkarthi commented Mar 20, 2019

Copy link
Copy Markdown
Member

Return None after calling unittest.mock.patch.object.stop() regardless of whether the object was started. This makes the method idempotent.

https://bugs.python.org/issue36366

@tirkarthi tirkarthi changed the title bpo36366: Return None on stopping unstarted patch object bpo-36366: Return None on stopping unstarted patch object Mar 20, 2019
@cclauss cclauss mentioned this pull request Mar 20, 2019
14 tasks

@brettcannon brettcannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some minor naming and grammar stuff, otherwise LGTM!

Comment thread Lib/unittest/test/testmock/testpatch.py Outdated
Comment thread Lib/unittest/test/testmock/testpatch.py Outdated
Comment thread Lib/unittest/test/testmock/testpatch.py Outdated
@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Co-Authored-By: tirkarthi <tir.karthi@gmail.com>
@tirkarthi tirkarthi closed this Mar 27, 2019
@tirkarthi tirkarthi reopened this Mar 27, 2019
@tirkarthi

Copy link
Copy Markdown
Member Author

Travis has some problems https://www.traviscistatus.com

@tirkarthi

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@brettcannon: please review the changes made to this pull request.

@tirkarthi

Copy link
Copy Markdown
Member Author

Thanks Brett :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants