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

Method target_get_fixture

tests/test_action.py:195–206  ·  view source on GitHub ↗
(self, request, action_prop_, _slide_index_prop_, part_prop_)

Source from the content-addressed store, hash-verified

193 ]
194 )
195 def target_get_fixture(self, request, action_prop_, _slide_index_prop_, part_prop_):
196 action_type, expected_value = request.param
197 cNvPr = element("p:cNvPr/a:hlinkClick{r:id=rId6}")
198 action_setting = ActionSetting(cNvPr, None)
199 action_prop_.return_value = action_type
200 _slide_index_prop_.return_value = 2
201 # this becomes the return value of ActionSetting._slides
202 prs_part_ = part_prop_.return_value.package.presentation_part
203 prs_part_.presentation.slides = [0, 1, 2, 3, 4, 5]
204 related_part_ = part_prop_.return_value.related_part
205 related_part_.return_value.slide = 4
206 return action_setting, expected_value
207
208 @pytest.fixture(params=[(PP_ACTION.NEXT_SLIDE, 2), (PP_ACTION.PREVIOUS_SLIDE, 0)])
209 def target_raise_fixture(self, request, action_prop_, part_prop_, _slide_index_prop_):

Callers

nothing calls this directly

Calls 2

ActionSettingClass · 0.90
elementFunction · 0.85

Tested by

no test coverage detected