def test_iter_rows(self, row, column, coordinate):
     from itertools import islice
     ws = Worksheet(self.wb)
     ws.cell('A1').value = 'first'
     ws.cell('C9').value = 'last'
     assert ws.calculate_dimension() == 'A1:C9'
     rows = ws.iter_rows()
     first_row = tuple(next(islice(rows, row - 1, row)))
     assert first_row[column].coordinate == coordinate
 def test_worksheet_dimension(self):
     ws = Worksheet(self.wb)
     assert 'A1:A1' == ws.calculate_dimension()
     ws.cell('B12').value = 'AAA'
     assert 'A12:B12' == ws.calculate_dimension()
 def test_iter_rows(self, row, column, coordinate):
     from itertools import islice
     ws = Worksheet(self.wb)
     ws.cell('A1').value = 'first'
     ws.cell('C9').value = 'last'
     assert ws.calculate_dimension() == 'A1:C9'
     rows = ws.iter_rows()
     first_row = tuple(next(islice(rows, row-1, row)))
     assert first_row[column].coordinate == coordinate
예제 #4
0
 def test_worksheet_dimension(self):
     ws = Worksheet(self.wb)
     eq_('A1:A1', ws.calculate_dimension())
     ws.cell('B12').value = 'AAA'
     eq_('A1:B12', ws.calculate_dimension())
 def test_worksheet_dimension(self):
     ws = Worksheet(self.wb)
     assert 'A1:A1' == ws.calculate_dimension()
     ws.cell('B12').value = 'AAA'
     assert 'A12:B12' == ws.calculate_dimension()
예제 #6
0
 def test_worksheet_dimension(self):
     ws = Worksheet(self.wb)
     eq_('A1:A1', ws.calculate_dimension())
     ws.cell('B12').value = 'AAA'
     eq_('A1:B12', ws.calculate_dimension())