From: Elizabeth Uselton Date: Sat, 20 Jul 2019 02:19:00 +0000 (-0700) Subject: bpo-37555: Ensure _call_matcher returns _Call object X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d72d6f50f54330571ea36a1ce20979c95e32e0cf;p=thirdparty%2FPython%2Fcpython.git bpo-37555: Ensure _call_matcher returns _Call object --- diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 93379dbfb56e..f91836554107 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -820,7 +820,7 @@ class NonCallableMock(Base): else: name, args, kwargs = _call try: - return name, sig.bind(*args, **kwargs) + return call(name, sig.bind(*args, **kwargs)) except TypeError as e: return e.with_traceback(None) else: