Rémi Lapeyre <remi.lape...@henki.fr> added the comment: The off-by-one error in a test added for an unrelated issue (#17467) makes me think @michael.foord just made a mistake in the test.
> mock_open docs mentions about using a customized mock for complex cases I think it's more for complex things like fetching data using a callback for example, this seems like a normal use case for mock_open(). Even more so, leaving the behavior as it is now may lead someone to think there is a bug in its code. I opened a new PR to fix this issue: https://github.com/python/cpython/pull/11521 ---------- nosy: +remi.lapeyre _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31855> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com