MCPcopy Create free account
hub / github.com/scanny/python-pptx / function_mock

Function function_mock

tests/unitutil/mock.py:50–59  ·  view source on GitHub ↗

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
)

Source from the content-addressed store, hash-verified

48
49
50def 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
62def initializer_mock(request: FixtureRequest, cls: type, autospec: bool = True, **kwargs: Any):

Callers 15

_SeriesFactory_Method · 0.85
PlotFactory_Method · 0.85
BaseShapeFactory_Method · 0.85
SlideShapeFactory_Method · 0.85
BaseShapeFactory_Method · 0.85
SlideShapeFactory_Method · 0.85
_LayoutShapeFactory_Method · 0.85
BaseShapeFactory_Method · 0.85

Calls

no outgoing calls

Tested by 15

_SeriesFactory_Method · 0.68
PlotFactory_Method · 0.68
BaseShapeFactory_Method · 0.68
SlideShapeFactory_Method · 0.68
BaseShapeFactory_Method · 0.68
SlideShapeFactory_Method · 0.68
_LayoutShapeFactory_Method · 0.68
BaseShapeFactory_Method · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…