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-03-15.19:54:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458071655.0.0.816808426925.issue25690@psf.upfronthosting.co.za>
In-reply-to
Content
I copied the code in place of the old mock_open in unittest/mock.py.

Regarding the VFS issue, I think that it really depends on what you're trying to test. If you only care about "side effects" on the file system, the VFS way it much better and easier. But if you want to test the way files are handled by your code (proper handling of errors during open/read/write seems the obvious thing here, but I can think of other use cases), then I think MockOpen is the better tool.
History
Date User Action Args
2016-03-15 19:54:16Niv Ben-Davidsetrecipients: + Niv Ben-David, rbcollins, ezio.melotti, r.david.murray, michael.foord
2016-03-15 19:54:14Niv Ben-Davidsetmessageid: <1458071655.0.0.816808426925.issue25690@psf.upfronthosting.co.za>
2016-03-15 19:54:14Niv Ben-Davidlinkissue25690 messages
2016-03-15 19:54:14Niv Ben-Davidcreate