diff options
author | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-04-28 19:22:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 19:22:31 (GMT) |
commit | 521c8d6806adf0305c158d280ec00cca48e8ab22 (patch) | |
tree | 7f2567c05fc21b1ae3e0d1b209a99b0065c2bf12 /Lib/unittest/mock.py | |
parent | d9a43e20facdf4ad10186f820601c6580e1baa80 (diff) | |
download | cpython-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.py | 6 |
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 |