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

Method gradient_fixture

tests/dml/test_fill.py:181–196  ·  view source on GitHub ↗
(self, request, grad_fill_)

Source from the content-addressed store, hash-verified

179 ]
180 )
181 def gradient_fixture(self, request, grad_fill_):
182 cxml, expected_cxml = request.param
183
184 fill = FillFormat.from_fill_parent(element(cxml))
185 # --mock must be after FillFormat call to avoid poss. contructor call
186 _GradFill_ = class_mock(
187 request, "pptx.dml.fill._GradFill", return_value=grad_fill_, autospec=True
188 )
189 expected_xml = xml(
190 expected_cxml + "{rotWithShape=1}/(a:gsLst/(a:gs{pos=0}/a:scheme"
191 "Clr{val=accent1}/(a:tint{val=100000},a:shade{val=100000},a:satM"
192 "od{val=130000}),a:gs{pos=100000}/a:schemeClr{val=accent1}/(a:ti"
193 "nt{val=50000},a:shade{val=100000},a:satMod{val=350000})),a:lin{"
194 "scaled=0})"
195 )
196 return fill, _GradFill_, expected_xml, grad_fill_
197
198 @pytest.fixture
199 def pattern_get_fixture(self, fill_):

Callers

nothing calls this directly

Calls 4

elementFunction · 0.85
class_mockFunction · 0.85
xmlFunction · 0.85
from_fill_parentMethod · 0.80

Tested by

no test coverage detected