def test_append_text_error(self): cell = Cell(1.) with self.assertRaises(TypeError): cell.append_text('test')
def test_append_text_accept_style_name(self): cell = Cell('Text') cell.append_text('Text', style_name='test') self.assertEqual(cell.value, 'TextText')
def test_append_two_strings(self): cell = Cell('test1') cell.append_text('test2') self.assertEqual(cell.plaintext(), 'test1test2') self.assertEqual(cell.value, 'test1test2')
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')