예제 #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)
예제 #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')
예제 #3
0
 def test_render(self):
     table = Table([['a']])
     cell = Cell(value='v', index=0, table=table)
     self.assertEqual(cell.render(), ' v ')