diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 11:09:59 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 11:09:59 -0500 |
commit | ddf9d04e42168fdb25b742b35efc891789a4b6c9 (patch) | |
tree | c6ab873662cf1caba6364440d26ce5c0131d4c5d /tests/test_lxml.py | |
parent | 397483b981b7fe84d4f43dcb5c01268c3bf81602 (diff) |
Have the html5lib builder set the sniffed encoding after parsing, rather than before as happens with lxml.
Diffstat (limited to 'tests/test_lxml.py')
-rw-r--r-- | tests/test_lxml.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_lxml.py b/tests/test_lxml.py index 1218763..98dd8c2 100644 --- a/tests/test_lxml.py +++ b/tests/test_lxml.py @@ -383,10 +383,13 @@ class TestLXMLBuilderEncodingConversion(SoupTest): def setUp(self): super(TestLXMLBuilderEncodingConversion, self).setUp() - self.unicode_data = u"<html><head></head><body><foo>\xe9</foo></body></html>" + self.unicode_data = u"<html><head></head><body><foo>\N{LATIN SMALL LETTER E WITH ACUTE}</foo></body></html>" self.utf8_data = self.unicode_data.encode("utf-8") + + # Just so you know what it looks like. self.assertEqual( - self.utf8_data, "<html><head></head><body><foo>\xc3\xa9</foo></body></html>") + self.utf8_data, + "<html><head></head><body><foo>\xc3\xa9</foo></body></html>") def test_ascii_in_unicode_out(self): # ASCII input is converted to Unicode. The originalEncoding |