Ejemplo n.º 1
0
 def test_only_accepts_some_options_for_alignment(self):
     table = Table([['a']])
     cell = Cell(value='v', index=0, table=table)
     cell.alignment = 'left'
     cell.alignment = 'center'
     cell.alignment = 'right'
     def foo(): cell.alignment = 'foo'
     self.assertRaises(InvalidOptionError, foo)
Ejemplo n.º 2
0
 def test_should_allow_overriding_of_alignment(self):
     table = Table([['a']])
     cell = Cell(value='v', index=0, table=table)
     cell.alignment = 'center'
     self.assertEqual(cell.alignment, 'center')
Ejemplo n.º 3
0
 def test_render(self):
     table = Table([['a']])
     cell = Cell(value='v', index=0, table=table)
     self.assertEqual(cell.render(), ' v ')