Return mock patching function with qualified name `q_function_name`. Patch is reversed after calling test returns.
(
request: FixtureRequest, q_function_name: str, autospec: bool = True, **kwargs: Any
)
| 48 | |
| 49 | |
| 50 | def function_mock( |
| 51 | request: FixtureRequest, q_function_name: str, autospec: bool = True, **kwargs: Any |
| 52 | ): |
| 53 | """Return mock patching function with qualified name `q_function_name`. |
| 54 | |
| 55 | Patch is reversed after calling test returns. |
| 56 | """ |
| 57 | _patch = patch(q_function_name, autospec=autospec, **kwargs) |
| 58 | request.addfinalizer(_patch.stop) |
| 59 | return _patch.start() |
| 60 | |
| 61 | |
| 62 | def initializer_mock(request: FixtureRequest, cls: type, autospec: bool = True, **kwargs: Any): |
no outgoing calls
searching dependent graphs…