Example #1
0
 def is_placeholder_fixture(self, request, shape_elm_, txBody_):
     is_placeholder = request.param
     shape_elm_.has_ph_elm = is_placeholder
     shape = BaseShape(shape_elm_, None)
     return shape, is_placeholder
Example #2
0
 def dimensions_set_fixture(self, request, width, height):
     start_elm_fixt_name, expected_elm_fixt_name = request.param
     start_elm = request.getfuncargvalue(start_elm_fixt_name)
     shape = BaseShape(start_elm, None)
     expected_xml = request.getfuncargvalue(expected_elm_fixt_name).xml
     return shape, width, height, expected_xml
Example #3
0
 def id_fixture(self, request):
     xSp_cxml, expected_value = request.param
     shape = BaseShape(element(xSp_cxml), None)
     return shape, expected_value
Example #4
0
 def it_knows_it_doesnt_contain_a_table(self):
     shape = BaseShape(None, None)
     assert shape.has_table is False
Example #5
0
 def click_action_fixture(self, request, ActionSetting_, action_setting_):
     sp_cxml = request.param
     sp = element(sp_cxml)
     cNvPr = sp.xpath('//p:cNvPr')[0]
     shape = BaseShape(sp, None)
     return shape, ActionSetting_, cNvPr, action_setting_
Example #6
0
 def it_knows_it_doesnt_have_a_text_frame(self):
     shape = BaseShape(None, None)
     assert shape.has_text_frame is False
Example #7
0
 def it_knows_it_doesnt_contain_a_chart(self):
     shape = BaseShape(None, None)
     assert shape.has_chart is False
Example #8
0
 def position_set_fixture(self, request, left, top):
     start_elm_fixt_name, expected_elm_fixt_name = request.param
     start_elm = request.getfuncargvalue(start_elm_fixt_name)
     shape = BaseShape(start_elm, None)
     expected_xml = request.getfuncargvalue(expected_elm_fixt_name).xml
     return shape, left, top, expected_xml
Example #9
0
 def phfmt_raise_fixture(self):
     return BaseShape(element('p:sp/p:nvSpPr/p:nvPr'), None)
Example #10
0
 def phfmt_fixture(self, _PlaceholderFormat_, placeholder_format_):
     sp = element('p:sp/p:nvSpPr/p:nvPr/p:ph')
     ph = sp.xpath('//p:ph')[0]
     shape = BaseShape(sp, None)
     return shape, _PlaceholderFormat_, placeholder_format_, ph
Example #11
0
 def part_fixture(self, shapes_):
     parent_ = shapes_
     shape = BaseShape(None, parent_)
     return shape, parent_
Example #12
0
 def name_get_fixture(self, shape_name):
     shape_elm = (an_sp().with_nsdecls().with_child(an_nvSpPr().with_child(
         a_cNvPr().with_name(shape_name)))).element
     shape = BaseShape(shape_elm, None)
     return shape, shape_name