aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/unittest/test/testmock/testwith.py
Commit message (Collapse)AuthorAge
* gh-93839: Move Lib/unttest/test/ to Lib/test/test_unittest/ (#94043)Victor Stinner2022-06-21
| | | | | | | | * Move Lib/unittest/test/ to Lib/test/test_unittest/ * Remove Lib/test/test_unittest.py * Replace unittest.test with test.test_unittest * Remove unittest.load_tests() * Rewrite unittest __init__.py and __main__.py * Update build system, CODEOWNERS, and wasm_assets.py
* Restrict use of Mock objects as specs (GH-31090)Matthew Suozzo2022-02-03
| | | | | Follow-on to https://github.com/python/cpython/pull/25326 This covers cases where mock objects are passed directly to spec.
* bpo-37008: make mock_open handle able to honor next() (GH-13492)Damien Nadé2019-05-23
| | | | | | | | 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-07
| | | | | | | | 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-01
| | | | | | | | | | | 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-12
|
* bpo-32933: Implement __iter__ method on mock_open() (GH-5974)Tony Flury2018-09-13
|
* Issue #23004: mock_open() now reads binary data correctly when the type of ↵Berker Peksag2015-08-06
| | | | | | read_data is bytes. Initial patch by Aaron Hill.
* Issue #21750: Further fixup to be styled like other mock APIs.Robert Collins2015-07-24
|
* Issue #21750: mock_open.read_data can now be read from each instance, as itRobert Collins2015-07-17
| | | | could in Python 3.3.
* Closes issue 17467. Add readline and readlines support to ↵Michael Foord2013-03-19
| | | | unittest.mock.mock_open
* PEP 417: Adding unittest.mockMichael Foord2012-03-14