MCPcopy Index your code
hub / github.com/RustPython/RustPython / method

Function method

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

Source from the content-addressed store, hash-verified

2056def _get_method(name, func):
2057 "Turns a callable object (like a mock) into a real function"
2058 def method(self, /, *args, **kw):
2059 return func(self, *args, **kw)
2060 method.__name__ = name
2061 return method
2062

Callers 15

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
_test_flush_or_closeMethod · 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