Beispiel #1
0
    def test_init(self):
        table = Table((0, 0), 10, 10, default_grid=False)
        self.assertTrue(bool(table))
        style = table.get_cell_style('default')
        for border in ['left', 'right', 'top', 'bottom']:
            self.assertFalse(style[border]['status'])

        table = Table((0, 0), 10, 10, default_grid=True)
        style = table.get_cell_style('default')
        for border in ['left', 'right', 'top', 'bottom']:
            self.assertTrue(style[border]['status'])
Beispiel #2
0
 def test_cell_style(self):
     table = Table((0, 0), 10, 10)
     style = table.new_cell_style('extra', textcolor=199)
     style = table.get_cell_style('extra')
     self.assertEqual(style['textcolor'], 199)
     self.assertRaises(KeyError, table.get_cell_style, 'extraextra')