Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
2056
def
_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
repr1
Method · 0.85
handle_one_request
Method · 0.85
inner
Function · 0.85
_callTestMethod
Method · 0.85
inner
Function · 0.85
checkequalnofix
Method · 0.85
test_returns_new_copy
Method · 0.85
found_terminator
Method · 0.85
run_method
Method · 0.85
_test_remove_or_delitem
Method · 0.85
_check_iteration
Method · 0.85
_test_flush_or_close
Method · 0.85
Calls
1
func
Function · 0.50
Tested by
15
checkequalnofix
Method · 0.68
test_returns_new_copy
Method · 0.68
found_terminator
Method · 0.68
run_method
Method · 0.68
_test_remove_or_delitem
Method · 0.68
_check_iteration
Method · 0.68
_test_flush_or_close
Method · 0.68
_copy_file
Method · 0.68
_sock_operation
Method · 0.68
test_BufferedIOBase_readinto
Method · 0.68
test_redirect
Method · 0.68
test_py_methods
Method · 0.68