]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35512: Resolve string target to patch.dict decorator during function call GHGH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 25 Feb 2019 21:17:16 +0000 (13:17 -0800)
committerChris Withers <chris@withers.org>
Mon, 25 Feb 2019 21:17:16 +0000 (21:17 +0000)
commitea199b90bb61866cd3c2f154341d1eb0d5c4a710
treeb722aa1d2d31618ac8849e63cc1a88fe74fda844
parent95fc8e687c487ecf97f4b1b98dfc0c05e3c9cbff
bpo-35512: Resolve string target to patch.dict decorator during function call GHGH-12000 (#12021)

* 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
(cherry picked from commit a875ea58b29fbf510f9790ae1653eeaa47dc0de8)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
Lib/unittest/mock.py
Lib/unittest/test/testmock/support.py
Lib/unittest/test/testmock/testpatch.py
Misc/NEWS.d/next/Library/2019-02-24-00-04-10.bpo-35512.eWDjCJ.rst [new file with mode: 0644]