summaryrefslogtreecommitdiff
path: root/src/beautifulsoup/tests/test_lxml.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/beautifulsoup/tests/test_lxml.py')
-rw-r--r--src/beautifulsoup/tests/test_lxml.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/beautifulsoup/tests/test_lxml.py b/src/beautifulsoup/tests/test_lxml.py
index cd22b6f..b53ee42 100644
--- a/src/beautifulsoup/tests/test_lxml.py
+++ b/src/beautifulsoup/tests/test_lxml.py
@@ -1,6 +1,9 @@
"""Tests to ensure that the lxml tree builder generates good trees."""
-from helpers import BuilderInvalidMarkupSmokeTest, BuilderSmokeTest
+from beautifulsoup.testing import (
+ BuilderInvalidMarkupSmokeTest,
+ BuilderSmokeTest,
+)
class TestLXMLBuilder(BuilderSmokeTest):
"""See `BuilderSmokeTest`."""
@@ -10,6 +13,15 @@ class TestLXMLBuilder(BuilderSmokeTest):
self.assertSoupEquals(
"A bare string", "<p>A bare string</p>")
+ def test_foo(self):
+ isolatin = """<html><meta http-equiv="Content-type" content="text/html; charset=ISO-Latin-1" />Sacr\xe9 bleu!</html>"""
+ soup = self.soup(isolatin)
+
+ utf8 = isolatin.replace("ISO-Latin-1".encode(), "utf-8".encode())
+ utf8 = utf8.replace("\xe9", "\xc3\xa9")
+
+ print soup
+
class TestLXMLBuilderInvalidMarkup(BuilderInvalidMarkupSmokeTest):
"""See `BuilderInvalidMarkupSmokeTest`."""