Test `BlockParser.parseDocument`.
(self)
| 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 | |
| 147 | class TestBlockParserState(unittest.TestCase): |
nothing calls this directly
no test coverage detected