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

Function loose_mock

tests/unitutil/mock.py:90–96  ·  view source on GitHub ↗

Return a "loose" mock, meaning it has no spec to constrain calls on it. Additional keyword arguments are passed through to Mock(). If called without a name, it is assigned the name of the fixture.

(request: FixtureRequest, name: str | None = None, **kwargs: Any)

Source from the content-addressed store, hash-verified

88
89
90def loose_mock(request: FixtureRequest, name: str | None = None, **kwargs: Any):
91 """Return a "loose" mock, meaning it has no spec to constrain calls on it.
92
93 Additional keyword arguments are passed through to Mock(). If called without a name,
94 it is assigned the name of the fixture.
95 """
96 return Mock(name=request.fixturename if name is None else name, **kwargs)
97
98
99def method_mock(

Callers 3

subshape_with_parent_Method · 0.85
mock_xml_bytesFunction · 0.85

Calls

no outgoing calls

Tested by 3

subshape_with_parent_Method · 0.68
mock_xml_bytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…