Turns a callable object (like a mock) into a real function
(name, func)
| 2061 | |
| 2062 | |
| 2063 | def _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 | |
| 2070 | |
| 2071 | _magics = { |
no outgoing calls
no test coverage detected
searching dependent graphs…