cpython/Lib/test/test_unittest/testmock
Miss Islington (bot) e8dbe7ec57
[3.13] gh-104745: Limit starting a patcher more than once without stopping it (GH-126649) (#126772)
gh-104745: Limit starting a patcher more than once without stopping it (GH-126649)

Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object.

---------

(cherry picked from commit 1e40c5ba47)

Co-authored-by: Red4Ru <39802734+Red4Ru@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-13 08:46:12 +00:00
..
__init__.py
__main__.py
support.py [3.13] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120334) 2024-06-11 06:04:06 +00:00
testasync.py
testcallable.py
testhelpers.py [3.13] gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ (GH-120019) (#120336) 2024-06-11 06:12:16 +00:00
testmagicmethods.py [3.13] gh-123934: Fix MagicMock not to reset magic method return values (GH-124038) (#124231) 2024-09-29 18:11:03 -07:00
testmock.py [3.13] gh-120732: Fix name passing to Mock, when using kwargs to create_autospec (GH-120737) (#120760) 2024-06-19 20:59:28 +00:00
testpatch.py [3.13] gh-104745: Limit starting a patcher more than once without stopping it (GH-126649) (#126772) 2024-11-13 08:46:12 +00:00
testsealable.py
testsentinel.py
testthreadingmock.py
testwith.py