MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _callable

Function _callable

tools/python-3.11.9-amd64/Lib/unittest/mock.py:150–157  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

148
149
150def _callable(obj):
151 if isinstance(obj, type):
152 return True
153 if isinstance(obj, (staticmethod, classmethod, MethodType)):
154 return _callable(obj.__func__)
155 if getattr(obj, '__call__', None) is not None:
156 return True
157 return False
158
159
160def _is_list(obj):

Callers 10

test_typeMethod · 0.90
test_staticmethodMethod · 0.90
test_classmethodMethod · 0.90
_try_iterFunction · 0.85
_execute_mock_callMethod · 0.85
_execute_mock_callMethod · 0.85
create_autospecFunction · 0.85

Calls

no outgoing calls

Tested by 6

test_typeMethod · 0.72
test_staticmethodMethod · 0.72
test_classmethodMethod · 0.72