summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
authorKarthikeyan Singaravelan <tir.karthi@gmail.com>2020-04-28 19:22:31 (GMT)
committerGitHub <noreply@github.com>2020-04-28 19:22:31 (GMT)
commit521c8d6806adf0305c158d280ec00cca48e8ab22 (patch)
tree7f2567c05fc21b1ae3e0d1b209a99b0065c2bf12 /Lib/unittest/mock.py
parentd9a43e20facdf4ad10186f820601c6580e1baa80 (diff)
downloadcpython-521c8d6806adf0305c158d280ec00cca48e8ab22.zip
cpython-521c8d6806adf0305c158d280ec00cca48e8ab22.tar.gz
cpython-521c8d6806adf0305c158d280ec00cca48e8ab22.tar.bz2
bpo-39966: Revert "bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock" (GH-19734)
* Revert "bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock (#16029)" This reverts commit 72b1004657e60c900e4cd031b2635b587f4b280e.
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r--Lib/unittest/mock.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index c0178f1..b495a5f 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -2012,12 +2012,6 @@ _side_effect_methods = {
def _set_return_value(mock, method, name):
- # If _mock_wraps is present then attach it so that wrapped object
- # is used for return value is used when called.
- if mock._mock_wraps is not None:
- method._mock_wraps = getattr(mock._mock_wraps, name)
- return
-
fixed = _return_values.get(name, DEFAULT)
if fixed is not DEFAULT:
method.return_value = fixed