def len_fixture(self, request): tbl_cxml, expected_len = request.param rows = _RowCollection(element(tbl_cxml), None) return rows, expected_len
def iter_fixture(self, request): tbl_cxml = request.param tbl = element(tbl_cxml) rows = _RowCollection(tbl, None) expected_row_lst = tbl.findall(qn('a:tr')) return rows, expected_row_lst
def it_raises_on_indexed_access_out_of_range(self): rows = _RowCollection(element('a:tbl/a:tr'), None) with pytest.raises(IndexError): rows[-1] with pytest.raises(IndexError): rows[9]
def iter_fixture(self, request): tbl_cxml = request.param tbl = element(tbl_cxml) rows = _RowCollection(tbl, None) expected_row_lst = tbl.findall(qn("a:tr")) return rows, expected_row_lst
def it_raises_on_indexed_access_out_of_range(self): rows = _RowCollection(element("a:tbl/a:tr"), None) with pytest.raises(IndexError): rows[-1] with pytest.raises(IndexError): rows[9]