[issue21750] mock_open data is visible only once for the life of the class

Paul Koning report at bugs.python.org
Wed Jul 22 01:54:34 CEST 2015


Paul Koning added the comment:

So if I understand right, it seems to me the 3.5/mock 1.1.4 behavior is correct.  mock_open(read_data="f") acts like a file that contains f, and m() acts like an open() of that file.  So if I call open once, I should read the f, then EOF.  If I open twice, then each stream (x and y) is independent, and each sees f then EOF.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21750>
_______________________________________


More information about the Python-bugs-list mailing list