MCPcopy Index your code
hub / github.com/Python-Markdown/markdown / testParseDocument

Method testParseDocument

tests/test_apis.py:135–144  ·  view source on GitHub ↗

Test `BlockParser.parseDocument`.

(self)

Source from the content-addressed store, hash-verified

133 )
134
135 def testParseDocument(self):
136 """ Test `BlockParser.parseDocument`. """
137 lines = ['#foo', '', 'bar', '', ' baz']
138 tree = self.parser.parseDocument(lines)
139 self.assertIsInstance(tree, etree.ElementTree)
140 self.assertIs(etree.iselement(tree.getroot()), True)
141 self.assertEqual(
142 markdown.serializers.to_xhtml_string(tree.getroot()),
143 "<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>"
144 )
145
146
147class TestBlockParserState(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

parseDocumentMethod · 0.80

Tested by

no test coverage detected