aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/unittest/test/testmock/support.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
* 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.
* bpo-35512: Resolve string target to patch.dict decorator during function ↵Xtreak2019-02-24
| | | | | | | | | | | | | | call GH#12000 * Resolve string target to patch.dict during function call * Add NEWS entry * Remove unneeded call * Restore original value for support.target and refactor assertions * Add extra assertion to verify unpatched dict
* Remove unused function in `testmock/support.py` (GH-10975)Mario Corchero2018-12-06
| | | | The function is never imported and the implementation is actually buggy. As `warnings.catch_warnings` is not imported here.
* Issue #23277: Remove unused sys and os importsBerker Peksag2016-04-24
| | | | Patch by Jon Dufresne.
* PEP 417: Adding unittest.mockMichael Foord2012-03-14