Exemplo n.º 1
0
 def iter_fixture(self, BaseShapeFactory_):
     spTree = element('p:spTree/(p:sp,p:sp)')
     sps = spTree.xpath('p:sp')
     shapes = _BaseShapes(spTree, None)
     expected_shapes = [Shape(None, None), Shape(None, None)]
     calls = [call(sps[0], shapes), call(sps[1], shapes)]
     BaseShapeFactory_.side_effect = iter(expected_shapes)
     return shapes, expected_shapes, BaseShapeFactory_, calls
Exemplo n.º 2
0
 def next_id_fixture(self, request):
     spTree_cxml, expected_value = request.param
     shapes = _BaseShapes(element(spTree_cxml), None)
     return shapes, expected_value
Exemplo n.º 3
0
 def len_fixture(self):
     shapes = _BaseShapes(element('p:spTree/(p:spPr,p:sp,p:sp)'), None)
     expected_count = 2
     return shapes, expected_count
Exemplo n.º 4
0
 def iter_elms_fixture(self):
     spTree = element('p:spTree/(p:sp,p:sp)')
     sps = spTree.xpath('p:sp')
     shapes = _BaseShapes(spTree, None)
     return shapes, sps
Exemplo n.º 5
0
 def getitem_raises_fixture(self):
     spTree = element('p:spTree/(p:sp,p:sp)')
     shapes = _BaseShapes(spTree, None)
     return shapes
Exemplo n.º 6
0
 def getitem_fixture(self, BaseShapeFactory_, shape_):
     spTree = element('p:spTree/(p:sp,p:sp)')
     shapes = _BaseShapes(spTree, None)
     idx = 1
     sp = spTree.xpath('p:sp')[idx]
     return shapes, idx, BaseShapeFactory_, sp, shape_