From d72d6f50f54330571ea36a1ce20979c95e32e0cf Mon Sep 17 00:00:00 2001 From: Elizabeth Uselton Date: Fri, 19 Jul 2019 19:19:00 -0700 Subject: [PATCH] bpo-37555: Ensure _call_matcher returns _Call object --- Lib/unittest/mock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.47.3