New submission from Jay Crotts <crotts....@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@python components: Documentation messages: 318337 nosy: docs@python, jcrotts priority: normal severity: normal status: open title: Document builtins in mock_open type: enhancement versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com