[New-bugs-announce] [issue33722] Document builtins in mock_open

Jay Crotts report at bugs.python.org
Thu May 31 14:35:34 EDT 2018


New submission from Jay Crotts <crotts.jay at gmail.com>:

The examples on using mock_open only include instances where objects are mocked in the REPL, so '__main__'.open is replaced. Commonly objects are mocked for use in other test modules, so builtins.open would be used instead.

A note about this in the documentation would be useful not familiar with python internals. I'm happy to do a PR for it.

----------
assignee: docs at python
components: Documentation
messages: 318337
nosy: docs at python, jcrotts
priority: normal
severity: normal
status: open
title: Document builtins in mock_open
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33722>
_______________________________________


More information about the New-bugs-announce mailing list