Michael Foord added the comment: So the problem with the testing-cabal issue 280 is *really* a problem with decorators - the decorator is applied at method creation time and mock_open is only called once rather than once *per call*.
Better would be to use mock.patch as a context manager inside the test, so that mock_open is (correctly) called each time. >From a purist point of view I think that the Python 3.5==mock 1.1.4 behaviour >is *better*. Whether that's enough justification to break existing code is a >difficult question. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21750> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com