From: Elizabeth Uselton Date: Sat, 20 Jul 2019 15:58:14 +0000 (-0700) Subject: bpo-37555: Fixed call on bound arguments to respect args and kwargs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883841ad3104aa009d28aa1f5feb82d957f965eb;p=thirdparty%2FPython%2Fcpython.git bpo-37555: Fixed call on bound arguments to respect args and kwargs --- diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 01925539b349..95c728fa6604 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -814,7 +814,8 @@ class NonCallableMock(Base): else: name, args, kwargs = _call try: - return call(name, sig.bind(*args, **kwargs)) + bound_call = sig.bind(*args, **kwargs) + return call(name, bound_call.args, bound_call.kwargs) except TypeError as e: return e.with_traceback(None) else: