https://github.com/python/cpython/commit/7aae4f004e69ebec011098f85ab232e2778a0ca4 commit: 7aae4f004e69ebec011098f85ab232e2778a0ca4 branch: 3.7 author: Stéphane Wirtel <stephane at wirtel.be> committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> date: 2019年09月16日T11:16:34-07:00 summary: [3.7] bpo-38100: Fix spelling error in unittest.mock code (GH-16195) https://bugs.python.org/issue38100 Automerge-Triggered-By: @matrixise files: M Lib/unittest/mock.py diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 1ec998ccd1a7..b1ab8631a422 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1876,10 +1876,10 @@ def _set_return_value(mock, method, name): method.return_value = fixed return - return_calulator = _calculate_return_value.get(name) - if return_calulator is not None: + return_calculator = _calculate_return_value.get(name) + if return_calculator is not None: try: - return_value = return_calulator(mock) + return_value = return_calculator(mock) except AttributeError: # XXXX why do we return AttributeError here? # set it as a side_effect instead?