Robert Collins added the comment:

I think its worth noting that both the original mock_open and the new one are 
entirely broken for mocking access to multiple files.

But, the breakage was not deliberate, and as the mock-280 example shows, folk 
subclassing a test suite will be surprisingly broken vs the long table releases 
of mock itself.

So, I think its ok to fix this - relying on the second file appearing empty is 
IMO unlikely, and being more compatible with the prior releases of mock is good.

We probably need to rethink this interface and provide a better one though, so 
that you can mock a filesystem easily. Thats a different discussion though.

----------

_______________________________________
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

Reply via email to