diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-06-21 07:42:55 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-06-21 07:42:55 -0400 |
commit | 95e2264dc5cacce6041d94ba731c5b15460b37ac (patch) | |
tree | c98c43776052dcba1dfe69504bbb1b34e0cc34ce | |
parent | 89a4f3d0829a70b655bcf7c904dc06098a09ea4a (diff) | |
download | markdown-95e2264dc5cacce6041d94ba731c5b15460b37ac.tar.gz markdown-95e2264dc5cacce6041d94ba731c5b15460b37ac.tar.bz2 markdown-95e2264dc5cacce6041d94ba731c5b15460b37ac.zip |
Fixed a few failing API tests. ElementTree is only available from markdown.util.etree not markdown.etree. This may be a backward incompatable change for some extensions.
-rw-r--r-- | tests/test_apis.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py index 0de897a..042b1c1 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -43,18 +43,18 @@ class TestBlockParser(unittest.TestCase): def testParseChunk(self): """ Test BlockParser.parseChunk. """ - root = markdown.etree.Element("div") + root = markdown.util.etree.Element("div") text = 'foo' self.parser.parseChunk(root, text) - self.assertEqual(markdown.etree.tostring(root), "<div><p>foo</p></div>") + self.assertEqual(markdown.util.etree.tostring(root), "<div><p>foo</p></div>") def testParseDocument(self): """ Test BlockParser.parseDocument. """ 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()), + self.assert_(isinstance(tree, markdown.util.etree.ElementTree)) + self.assert_(markdown.util.etree.iselement(tree.getroot())) + self.assertEqual(markdown.util.etree.tostring(tree.getroot()), "<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>") |