MCPcopy Index your code
hub / github.com/python/cpython / method

Function method

Lib/unittest/mock.py:2065–2066  ·  view source on GitHub ↗
(self, /, *args, **kw)

Source from the content-addressed store, hash-verified

2063def _get_method(name, func):
2064 "Turns a callable object (like a mock) into a real function"
2065 def method(self, /, *args, **kw):
2066 return func(self, *args, **kw)
2067 method.__name__ = name
2068 return method
2069

Callers 15

__call__Method · 0.85
repr1Method · 0.85
handle_one_requestMethod · 0.85
innerFunction · 0.85
_callTestMethodMethod · 0.85
innerFunction · 0.85
checkequalnofixMethod · 0.85
test_returns_new_copyMethod · 0.85
found_terminatorMethod · 0.85
run_methodMethod · 0.85
_check_iterationMethod · 0.85

Calls 1

funcFunction · 0.50

Tested by 15

checkequalnofixMethod · 0.68
test_returns_new_copyMethod · 0.68
found_terminatorMethod · 0.68
run_methodMethod · 0.68
_check_iterationMethod · 0.68
_test_flush_or_closeMethod · 0.68
_copy_fileMethod · 0.68
_sock_operationMethod · 0.68
test_redirectMethod · 0.68
test_py_methodsMethod · 0.68
test_c_methodsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…