summaryrefslogtreecommitdiff
path: root/tests/test_lxml.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_lxml.py')
-rw-r--r--tests/test_lxml.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_lxml.py b/tests/test_lxml.py
index 65c8719..7ce33e8 100644
--- a/tests/test_lxml.py
+++ b/tests/test_lxml.py
@@ -523,6 +523,13 @@ class TestLXMLXMLBuilder(SoupTest):
def default_builder(self):
return LXMLTreeBuilderForXML()
+ def test_mixed_case_tags(self):
+ # Mixed-case tags are *not* folded to lowercase, but the
+ # end tag is always the same case as the start tag.
+ self.assertSoupEquals(
+ "<a><B><Cd><EFG /></CD></b></A>",
+ "<a><B><Cd><EFG /></Cd></B></a>")
+
def test_cdata_becomes_text(self):
# LXML sends CData sections as 'data' events, so we can't
@@ -535,12 +542,6 @@ class TestLXMLXMLBuilder(SoupTest):
self.assertEquals(cdata.__class__.__name__, 'NavigableString')
- def test_mixed_case_tags(self):
- # Mixed-case tags are folded to lowercase.
- self.assertSoupEquals(
- "<a><B><Cd><EFG></efg></CD></b></A>",
- "<a><b><cd><efg></efg></cd></b></a>")
-
def test_can_handle_invalid_xml(self):
self.assertSoupEquals("<a><b>", "<a><b /></a>")