diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-02-24 18:54:49 (GMT) |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2019-02-24 18:54:49 (GMT) |
commit | a875ea58b29fbf510f9790ae1653eeaa47dc0de8 (patch) | |
tree | 076c625afd240521c200df9b98485846f32687a4 /Lib/unittest/test/testmock/support.py | |
parent | aeca373b339e0ea9739536ce6b43bd90f3b89873 (diff) | |
download | cpython-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 'Lib/unittest/test/testmock/support.py')
-rw-r--r-- | Lib/unittest/test/testmock/support.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/support.py b/Lib/unittest/test/testmock/support.py index c7ad20b..f146be2 100644 --- a/Lib/unittest/test/testmock/support.py +++ b/Lib/unittest/test/testmock/support.py @@ -1,3 +1,6 @@ +target = {'foo': 'FOO'} + + def is_instance(obj, klass): """Version of is_instance that doesn't access __class__""" return issubclass(type(obj), klass) |