]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix `mock.patch.dict` to be stopped with `mock.patch.stopall` (#17606)
authorMario Corchero <mariocj89@gmail.com>
Fri, 24 Jan 2020 08:38:33 +0000 (08:38 +0000)
committerChris Withers <chris@withers.org>
Fri, 24 Jan 2020 08:38:32 +0000 (08:38 +0000)
commite131c9720d087c0c4988bd2a5c62020feb9d1d77
tree209230859dbb25990ed04ce139bf06abac490e04
parent1d0c5e16eab29d55773cc4196bb90d2bf12e09dd
Fix `mock.patch.dict` to be stopped with `mock.patch.stopall` (#17606)

As the function was not registering in the active patches, the mocks
started by `mock.patch.dict` were not being stopped when
`mock.patch.stopall` was being called.
Lib/unittest/mock.py
Lib/unittest/test/testmock/testpatch.py
Misc/NEWS.d/next/Library/2019-12-14-14-38-40.bpo-21600.kC4Cgh.rst [new file with mode: 0644]