コード例 #1
0
ファイル: test_table_cell.py プロジェクト: MicahStevens/ezodf
 def test_append_text_error(self):
     cell = Cell(1.)
     with self.assertRaises(TypeError):
         cell.append_text('test')
コード例 #2
0
ファイル: test_table_cell.py プロジェクト: MicahStevens/ezodf
 def test_append_text_accept_style_name(self):
     cell = Cell('Text')
     cell.append_text('Text', style_name='test')
     self.assertEqual(cell.value, 'TextText')
コード例 #3
0
ファイル: test_table_cell.py プロジェクト: MicahStevens/ezodf
 def test_append_two_strings(self):
     cell = Cell('test1')
     cell.append_text('test2')
     self.assertEqual(cell.plaintext(), 'test1test2')
     self.assertEqual(cell.value, 'test1test2')
コード例 #4
0
ファイル: test_table_cell.py プロジェクト: MicahStevens/ezodf
 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')
コード例 #5
0
ファイル: test_table_cell.py プロジェクト: samuelv0304/ezodf
 def test_append_text_error(self):
     cell = Cell(1.)
     with self.assertRaises(TypeError):
         cell.append_text('test')
コード例 #6
0
ファイル: test_table_cell.py プロジェクト: samuelv0304/ezodf
 def test_append_two_strings(self):
     cell = Cell('test1')
     cell.append_text('test2')
     self.assertEqual(cell.plaintext(), 'test1test2')
     self.assertEqual(cell.value, 'test1test2')
コード例 #7
0
ファイル: test_table_cell.py プロジェクト: samuelv0304/ezodf
 def test_append_text_accept_style_name(self):
     cell = Cell('Text')
     cell.append_text('Text', style_name='test')
     self.assertEqual(cell.value, 'TextText')
コード例 #8
0
ファイル: test_table_cell.py プロジェクト: samuelv0304/ezodf
 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')