]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
`unittest.mock` test and coverage fixup (#130787)
authorChris Withers <chris@withers.org>
Mon, 3 Mar 2025 11:44:59 +0000 (11:44 +0000)
committerGitHub <noreply@github.com>
Mon, 3 Mar 2025 11:44:59 +0000 (11:44 +0000)
commit04091c083340dde7d4eeb6d945c70f3b37d88f85
tree8d2992f06e9ebd1371c957acd8a83c9d537ba107
parentf693f8422700f889f90ab548ceeb24704a2ae952
`unittest.mock` test and coverage fixup (#130787)

* Mark functions that will never be called with # pragma: no cover

* Fix testpatch.PatchTest.test_exit_idempotent

.stop() and __exit__ have subtly different code paths, so to really test __exit__ idempotency, we need to call it specifically twice.
Lib/test/test_unittest/testmock/testhelpers.py
Lib/test/test_unittest/testmock/testmock.py
Lib/test/test_unittest/testmock/testpatch.py