This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Niv Ben-David
Recipients Niv Ben-David, ezio.melotti, michael.foord, r.david.murray, rbcollins
Date 2016-01-30.20:39:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Regarding the documentation changes, my version simply mocks `open` more "closely", so for the most part I can't think of any changes to the documentation. I've added a bit about the mock object acting as a map of file names to mock objects. Should I add anything else?

Regarding the tests, I've tried changing as little as possible to make sure I don't have any backward compatibility issues. However, some changes had to be made:
* By default, `open`'s mode is 'r', the new mock_open imitates this behavior, and so the test shows. Also, calling `open` as a context manager will call `close` in `__exit__`. These are the majority of changes to the testing code.
* test_mock_open_write and test_mock_open_read_with_argument: These functionalities' testing is taken care of by the new mock_open tests.
* test_readlines_data: I removed the `create` argument to `patch`. Must've been by accident. Fixed this in the new patch.

Sorry about the (very) late response, I've been preoccupied lately.
Date User Action Args
2016-01-30 20:39:41Niv Ben-Davidsetrecipients: + Niv Ben-David, rbcollins, ezio.melotti, r.david.murray, michael.foord
2016-01-30 20:39:38Niv Ben-Davidsetmessageid: <>
2016-01-30 20:39:38Niv Ben-Davidlinkissue25690 messages
2016-01-30 20:39:38Niv Ben-Davidcreate