summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorXtreak <tir.karthi@gmail.com>2019-02-24 18:54:49 (GMT)
committerChris Withers <chris@withers.org>2019-02-24 18:54:49 (GMT)
commita875ea58b29fbf510f9790ae1653eeaa47dc0de8 (patch)
tree076c625afd240521c200df9b98485846f32687a4 /Misc
parentaeca373b339e0ea9739536ce6b43bd90f3b89873 (diff)
downloadcpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.zip
cpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.tar.gz
cpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.tar.bz2
bpo-35512: Resolve string target to patch.dict decorator during function call GH#12000
* 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
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-02-24-00-04-10.bpo-35512.eWDjCJ.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-02-24-00-04-10.bpo-35512.eWDjCJ.rst b/Misc/NEWS.d/next/Library/2019-02-24-00-04-10.bpo-35512.eWDjCJ.rst
new file mode 100644
index 0000000..8281b1b
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-02-24-00-04-10.bpo-35512.eWDjCJ.rst
@@ -0,0 +1,3 @@
+:func:`unittest.mock.patch.dict` used as a decorator with string target
+resolves the target during function call instead of during decorator
+construction. Patch by Karthikeyan Singaravelan.