MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / testNoTOCMarker

Method testNoTOCMarker

tests/test_syntax/extensions/test_toc.py:59–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 )
58
59 def testNoTOCMarker(self):
60 self.assertMarkdownRenders(
61 self.dedent(
62 '''
63 # Header 1
64
65 ## Header 2
66 '''
67 ),
68 self.dedent(
69 '''
70 <h1 id="header-1">Header 1</h1>
71 <h2 id="header-2">Header 2</h2>
72 ''&#x27;
73 ),
74 expected_attrs={
75 'toc': (
76 '<div class="toc">\n'
77 '<ul>\n' # noqa
78 '<li><a href="#header-1">Header 1</a>' # noqa
79 '<ul>\n' # noqa
80 '<li><a href="#header-2">Header 2</a></li>\n' # noqa
81 '</ul>\n' # noqa
82 '</li>\n' # noqa
83 '</ul>\n' # noqa
84 '</div>\n'
85 )
86 }
87 )
88
89 def testAlternateTOCMarker(self):
90 self.assertMarkdownRenders(

Callers

nothing calls this directly

Calls 2

assertMarkdownRendersMethod · 0.80
dedentMethod · 0.80

Tested by

no test coverage detected