Chris Withers <ch...@withers.org> added the comment:
I'm not sure I like the API feel after this change: two parameters that can't be used at the same time. As Karthikeyan points out, this can be achieved using side_effect. Personally, I'd prefer a PR that adds a unit test showing that this approach works, and an example included in the docs as suggested above. Also, be aware that there can be better options for mocking files. https://github.com/jmcgeheeiv/pyfakefs/ and https://docs.pytest.org/en/latest/tmpdir.html would be my recommendation. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37669> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com