summaryrefslogtreecommitdiff
path: root/tests/test_lxml.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-10 16:41:10 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-10 16:41:10 -0500
commitd89c8878ea86a2575c87e9fad8081cfcd81e0bcd (patch)
treecdad3f97812e658d84a611b6017b7198fd97d818 /tests/test_lxml.py
parente1ad4220e5ca00ec0e7f77ce5087845fcb356a0e (diff)
Added some elementary doctype handling.
Diffstat (limited to 'tests/test_lxml.py')
-rw-r--r--tests/test_lxml.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_lxml.py b/tests/test_lxml.py
index 2af952f..9a65f6a 100644
--- a/tests/test_lxml.py
+++ b/tests/test_lxml.py
@@ -198,6 +198,14 @@ class TestLXMLBuilder(SoupTest):
# Tests below this line need work.
+ #def test_doctype(self):
+ # xml = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"><html>foo</html></p>'
+ # self.assertSoupEquals(xml)
+
+
+ #def test_cdata(self):
+ # print self.soup("<div><![CDATA[foo]]></div>")
+
def test_entities_converted_on_the_way_out(self):
text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
expected = u"&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;".encode("utf-8")
@@ -261,4 +269,7 @@ class TestLXMLBuilderInvalidMarkup(SoupTest):
'<table><tr><table><tr id="nested">',
'<table><tr><table><tr id="nested"></tr></table></tr></table>')
+ def test_doctype_in_body(self):
+ markup = "<p>one<!DOCTYPE foobar>two</p>"
+ self.assertSoupEquals(markup)