(self)
| 8 | |
| 9 | class TableOfContentsTests(unittest.TestCase): |
| 10 | def test_indented_toc(self): |
| 11 | md = dedent( |
| 12 | """ |
| 13 | # Heading 1 |
| 14 | ## Heading 2 |
| 15 | ### Heading 3 |
| 16 | """ |
| 17 | ) |
| 18 | expected = dedent( |
| 19 | """ |
| 20 | Heading 1 - #heading-1 |
| 21 | Heading 2 - #heading-2 |
| 22 | Heading 3 - #heading-3 |
| 23 | """ |
| 24 | ) |
| 25 | toc = get_toc(get_markdown_toc(md)) |
| 26 | self.assertEqual(str(toc).strip(), expected) |
| 27 | self.assertEqual(len(toc), 1) |
| 28 | |
| 29 | def test_indented_toc_html(self): |
| 30 | md = dedent( |
nothing calls this directly
no test coverage detected