Test `BlockParser.parseDocument`.
(self)
| 157 | ) |
| 158 | |
| 159 | def testParseDocument(self): |
| 160 | """ Test `BlockParser.parseDocument`. """ |
| 161 | lines = ['#foo', '', 'bar', '', ' baz'] |
| 162 | tree = self.parser.parseDocument(lines) |
| 163 | self.assertIsInstance(tree, etree.ElementTree) |
| 164 | self.assertIs(etree.iselement(tree.getroot()), True) |
| 165 | self.assertEqual( |
| 166 | markdown.serializers.to_xhtml_string(tree.getroot()), |
| 167 | "<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>" |
| 168 | ) |
| 169 | |
| 170 | |
| 171 | class TestBlockParserState(unittest.TestCase): |
nothing calls this directly
no test coverage detected