'Test BlockParser.parseDocument.'

def testParseDocument(self):

    lines = ['#foo', '', 'bar', '', '                baz']
    tree = self.parser.parseDocument(lines)
    self.assert_(isinstance(tree, markdown.etree.ElementTree))
    self.assert_(markdown.etree.iselement(tree.getroot()))
    self.assertEqual(markdown.etree.tostring(tree.getroot()), '<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>')
