Пример #1
0
 def test_empty_sheet(self):
     s = FormattableSheet([])
     ret = s.cell_value(100, 100)
     assert ret is None
     ret = s._cell_value(100, 100)
     assert ret == ""
Пример #2
0
 def test_freeze_formatter(self):
     s = FormattableSheet(self.data)
     s.freeze_formatters()
Пример #3
0
 def test_apply_column_formatter(self):
     s = FormattableSheet(self.data)
     s.apply_formatter(ColumnFormatter(0, float))
     assert s.column[0] == [1, 1, 1.1, 1.1, 2, 2]
Пример #4
0
 def test_apply_sheet_formatter(self):
     s = FormattableSheet(self.data)
     s.apply_formatter(SheetFormatter(float))
     assert s.row[0] == s.row[1]
     assert s.column[0] == [1, 1, 1.1, 1.1, 2, 2]
Пример #5
0
 def test_apply_row_formatter(self):
     s = FormattableSheet(self.data)
     s.apply_formatter(RowFormatter(0, str))
     assert s.row[0] == s.row[1]