Commit Graph

6 Commits

Author SHA1 Message Date
Chris Withers adbf178e49
Mock 100% coverage (GH-13045)
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.
2019-05-01 23:04:04 +01:00
Andrew Dunai e63e617ebb bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (#10873)
Fix minor typo in test function name.
2018-12-04 09:08:45 +00:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Antoine Pitrou 356bdeb0a1 Issue #19013: add unittest.main() epilogs to unittest.mock's own test modules 2013-09-13 23:54:01 +02:00
Michael Foord a74b3aa0cc Remove more Python 2 compatibility cruft from unittest.mock 2012-03-14 14:40:22 -07:00
Michael Foord 345266aa7e PEP 417: Adding unittest.mock 2012-03-14 12:24:34 -07:00