(self)
| 46 | self.assertEqual(len(toc), 1) |
| 47 | |
| 48 | def test_flat_toc(self): |
| 49 | md = dedent( |
| 50 | """ |
| 51 | # Heading 1 |
| 52 | # Heading 2 |
| 53 | # Heading 3 |
| 54 | """ |
| 55 | ) |
| 56 | expected = dedent( |
| 57 | """ |
| 58 | Heading 1 - #heading-1 |
| 59 | Heading 2 - #heading-2 |
| 60 | Heading 3 - #heading-3 |
| 61 | """ |
| 62 | ) |
| 63 | toc = get_toc(get_markdown_toc(md)) |
| 64 | self.assertEqual(str(toc).strip(), expected) |
| 65 | self.assertEqual(len(toc), 3) |
| 66 | |
| 67 | def test_flat_h2_toc(self): |
| 68 | md = dedent( |
nothing calls this directly
no test coverage detected