Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(246754)

#17660: mock.patch could whitelist builtins to not need create=True

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 4 months ago by michael
Modified:
5 years, 4 months ago
Reviewers:
merwok, berker.peksag
CC:
AntoinePitrou, eric.araujo, Michael Foord, devnull_psf.upfronthosting.co.za, berkerpeksag, kushaldas
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/unittest.mock.rst View 1 2 chunks +20 lines, -0 lines 0 comments Download
Lib/unittest/mock.py View 1 2 chunks +7 lines, -0 lines 1 comment Download
Lib/unittest/test/testmock/testpatch.py View 1 2 chunks +22 lines, -2 lines 0 comments Download

Messages

Total messages: 5
eric.araujo
http://bugs.python.org/review/17660/diff/7799/Lib/unittest/mock.py File Lib/unittest/mock.py (right): http://bugs.python.org/review/17660/diff/7799/Lib/unittest/mock.py#newcode1146 Lib/unittest/mock.py:1146: if name in __builtins__ and isinstance(target, ModuleType): __builtins__ is ...
5 years, 4 months ago #1
berkerpeksag
http://bugs.python.org/review/17660/diff/7799/Doc/library/unittest.mock.rst File Doc/library/unittest.mock.rst (right): http://bugs.python.org/review/17660/diff/7799/Doc/library/unittest.mock.rst#newcode1037 Doc/library/unittest.mock.rst:1037: to pass `create=True`, it will be added by default. ...
5 years, 4 months ago #2
eric.araujo
http://bugs.python.org/review/17660/diff/7799/Doc/library/unittest.mock.rst File Doc/library/unittest.mock.rst (right): http://bugs.python.org/review/17660/diff/7799/Doc/library/unittest.mock.rst#newcode1037 Doc/library/unittest.mock.rst:1037: to pass `create=True`, it will be added by default. ...
5 years, 4 months ago #3
Michael Foord
http://bugs.python.org/review/17660/diff/7799/Lib/unittest/mock.py File Lib/unittest/mock.py (right): http://bugs.python.org/review/17660/diff/7799/Lib/unittest/mock.py#newcode1146 Lib/unittest/mock.py:1146: if name in __builtins__ and isinstance(target, ModuleType): On 2014/04/11 ...
5 years, 4 months ago #4
eric.araujo
5 years, 4 months ago #5
http://bugs.python.org/review/17660/diff/11569/Lib/unittest/mock.py
File Lib/unittest/mock.py (right):

http://bugs.python.org/review/17660/diff/11569/Lib/unittest/mock.py#newcode35
Lib/unittest/mock.py:35: _builtins = {name for name in dir(builtins) if not
name.startswith('-')}
I think you meant _, not - :)
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+