From 5d4b8cc6d288a705cf87c2f2c26036b94d825aa9 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Fri, 28 Jan 2011 13:30:40 -0500 Subject: Refactored enough to get all of the tests to pass with test discovery, even though there are still some underlying problems. --- tests/test_lxml.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/test_lxml.py (limited to 'tests/test_lxml.py') diff --git a/tests/test_lxml.py b/tests/test_lxml.py new file mode 100644 index 0000000..7fe6870 --- /dev/null +++ b/tests/test_lxml.py @@ -0,0 +1,24 @@ +"""Tests to ensure that the lxml tree builder generates good trees.""" + +from beautifulsoup.builder.lxml_builder import LXMLTreeBuilder +from beautifulsoup.testing import ( + BuilderInvalidMarkupSmokeTest, + BuilderSmokeTest, +) + +class TestLXMLBuilder(BuilderSmokeTest): + """See `BuilderSmokeTest`.""" + + def test_foo(self): + isolatin = """Sacr\xe9 bleu!""" + 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`.""" + -- cgit v1.2.3