Esempio n. 1
0
 def test_append_text_error(self):
     cell = Cell(1.)
     with self.assertRaises(TypeError):
         cell.append_text('test')
Esempio n. 2
0
 def test_append_text_accept_style_name(self):
     cell = Cell('Text')
     cell.append_text('Text', style_name='test')
     self.assertEqual(cell.value, 'TextText')
Esempio n. 3
0
 def test_append_two_strings(self):
     cell = Cell('test1')
     cell.append_text('test2')
     self.assertEqual(cell.plaintext(), 'test1test2')
     self.assertEqual(cell.value, 'test1test2')
Esempio n. 4
0
 def test_set_new_string(self):
     cell = Cell(value_type='string')
     cell.append_text('test')
     self.assertEqual(cell.plaintext(), 'test')
     self.assertEqual(cell.value, 'test')
Esempio n. 5
0
 def test_append_text_error(self):
     cell = Cell(1.)
     with self.assertRaises(TypeError):
         cell.append_text('test')
Esempio n. 6
0
 def test_append_two_strings(self):
     cell = Cell('test1')
     cell.append_text('test2')
     self.assertEqual(cell.plaintext(), 'test1test2')
     self.assertEqual(cell.value, 'test1test2')
Esempio n. 7
0
 def test_append_text_accept_style_name(self):
     cell = Cell('Text')
     cell.append_text('Text', style_name='test')
     self.assertEqual(cell.value, 'TextText')
Esempio n. 8
0
 def test_set_new_string(self):
     cell = Cell(value_type='string')
     cell.append_text('test')
     self.assertEqual(cell.plaintext(), 'test')
     self.assertEqual(cell.value, 'test')