summaryrefslogtreecommitdiff
path: root/Lib/unittest/test/testmock/testwith.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37008: make mock_open handle able to honor next() (GH-13492)Damien Nadé2019-05-231-0/+15
| | | | | | | | I've reported the issue on https://bugs.python.org/issue37008 and now I'm trying to bring a solution to this minor issue. I think it could be trivially backported to 3.7 branch. https://bugs.python.org/issue37008
* bpo-31855: unittest.mock.mock_open() results now respects the argument of ↵Rémi Lapeyre2019-05-071-1/+6
| | | | | | | | read([size]) (GH-11521) unittest.mock.mock_open() results now respects the argument of read([size]) Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
* Mock 100% coverage (GH-13045)Chris Withers2019-05-011-8/+5
| | | | | | | | | | | This was achieved by: * moving many pass statements in tests onto their own lines, so they pass line coverage and can match an easy ignore pattern if branch coverage is added later. * removing code that cannot be reached. * removing long-disabled tests. * removing unused code. * adding tests for uncovered code It turned out that removing `if __name__ == '__main__'` blocks that run unittest.main() at the bottom of test files was surprisingly contentious, so they remain and can be filtered out with an appropriate .coveragerc.
* Add test for double patching instance methods (#11085)Anthony Sottile2018-12-121-0/+14
|
* bpo-32933: Implement __iter__ method on mock_open() (GH-5974)Tony Flury2018-09-131-0/+15
|
* Issue #23004: mock_open() now reads binary data correctly when the type of ↵Berker Peksag2015-08-061-0/+28
| | | | | | read_data is bytes. Initial patch by Aaron Hill.
* Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-241-2/+2
|
* Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-171-2/+16
| | | | could in Python 3.3.
* Closes issue 17467. Add readline and readlines support to ↵Michael Foord2013-03-191-0/+83
| | | | unittest.mock.mock_open
* PEP 417: Adding unittest.mockMichael Foord2012-03-141-0/+176