[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2017-10-23 Thread Ron Rothman
Ron Rothman <ron.roth...@gmail.com> added the comment: Confirmed that the behavior exists in Python 3.6 as well. -- versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2017-10-23 Thread Ron Rothman
New submission from Ron Rothman <ron.roth...@gmail.com>: mock.mock_open works as expected when reading the entire file (read()) or when reading a single line (readline()), but it seems to not support reading a number of bytes (read(n)). These work as expected: from mock import moc