예제 #1
0
 def test_one_title_lines(self):
     self.assertEqual(str(rst_titles_parser([
                 '',
                 'Hello world',
                 '=========== ',
                 'I am happy now\n',
                 ''])), 'Hello world')
예제 #2
0
 def test_no_title_lines(self):
     self.assertEqual(rst_titles_parser([
                 '',
                 'Hello world',
                 'I am happy now\n',
                 '']), None)
예제 #3
0
 def test_empty_lines(self):
     self.assertEqual(rst_titles_parser([]), None)