コード例 #1
0
 def test_heading_not_startig_from_h1_should_mention_reason(self):
     html = '''
         <h2>two</h2>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h2>two</h2>', reason.lower())
コード例 #2
0
ファイル: test_toc_generator.py プロジェクト: 0hoo/ecogwiki
 def test_heading_not_startig_from_h1_should_mention_reason(self):
     html = '''
         <h2>two</h2>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h2>two</h2>', reason.lower())
コード例 #3
0
 def test_invalid_level_of_headings_should_mention_reason(self):
     html = '''
         <h1>one</h1>
         <h1>two</h1>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h3>three</h3>', reason.lower())
コード例 #4
0
ファイル: test_toc_generator.py プロジェクト: 0hoo/ecogwiki
 def test_invalid_level_of_headings_should_mention_reason(self):
     html = '''
         <h1>one</h1>
         <h1>two</h1>
         <h3>three</h3>
     '''
     reason = TocGenerator(html).is_invalid()
     self.assertIn('<h3>three</h3>', reason.lower())