New submission from Michael Foord:

When patching builtin names (e.g. open) in a specific namespace you need to 
specify "create=True" or patch will refuse to create a name that doesn't exist.

patch could whitelist the builtin names, when the patch target is a module 
object, to not require the "create=True".

----------
assignee: michael.foord
components: Library (Lib)
keywords: easy
messages: 186290
nosy: michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: mock.patch could whitelist builtins to not need create=True
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to