Example #1
0
 def setUp(self):
     tr_xml = (
         '<a:tr %s h="370840"><a:tc><a:txBody><a:p/></a:txBody></a:tc><a:t'
         'c><a:txBody><a:p/></a:txBody></a:tc></a:tr>' % nsdecls('a')
     )
     test_tr_elm = parse_xml_bytes(tr_xml)
     self.cells = _CellCollection(test_tr_elm, None)
Example #2
0
 def setUp(self):
     tr_xml = (
         '<a:tr %s h="370840"><a:tc><a:txBody><a:p/></a:txBody></a:tc><a:t'
         'c><a:txBody><a:p/></a:txBody></a:tc></a:tr>' % nsdecls('a')
     )
     test_tr_elm = parse_xml_bytes(tr_xml)
     self.cells = _CellCollection(test_tr_elm, None)
Example #3
0
 def len_fixture(self, request):
     tr_cxml, expected_len = request.param
     cells = _CellCollection(element(tr_cxml), None)
     return cells, expected_len
Example #4
0
 def iter_fixture(self, request):
     tr_cxml = request.param
     tr = element(tr_cxml)
     cells = _CellCollection(tr, None)
     expected_cell_lst = tr.findall(qn('a:tc'))
     return cells, expected_cell_lst
Example #5
0
 def it_raises_on_indexed_access_out_of_range(self):
     cells = _CellCollection(element('a:tr/a:tc'), None)
     with pytest.raises(IndexError):
         cells[-1]
     with pytest.raises(IndexError):
         cells[9]
Example #6
0
 def len_fixture(self, request):
     tr_cxml, expected_len = request.param
     cells = _CellCollection(element(tr_cxml), None)
     return cells, expected_len
Example #7
0
 def iter_fixture(self, request):
     tr_cxml = request.param
     tr = element(tr_cxml)
     cells = _CellCollection(tr, None)
     expected_cell_lst = tr.findall(qn('a:tc'))
     return cells, expected_cell_lst
Example #8
0
 def it_raises_on_indexed_access_out_of_range(self):
     cells = _CellCollection(element('a:tr/a:tc'), None)
     with pytest.raises(IndexError):
         cells[-1]
     with pytest.raises(IndexError):
         cells[9]