예제 #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)
예제 #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)
예제 #3
0
 def len_fixture(self, request):
     tr_cxml, expected_len = request.param
     cells = _CellCollection(element(tr_cxml), None)
     return cells, expected_len
예제 #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
예제 #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]
예제 #6
0
 def len_fixture(self, request):
     tr_cxml, expected_len = request.param
     cells = _CellCollection(element(tr_cxml), None)
     return cells, expected_len
예제 #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
예제 #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]