diff options
Diffstat (limited to 'bs4/tests')
-rw-r--r-- | bs4/tests/__init__.py | 5 | ||||
-rw-r--r-- | bs4/tests/test_lxml.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bs4/tests/__init__.py b/bs4/tests/__init__.py index 6677d2e..5147f0e 100644 --- a/bs4/tests/__init__.py +++ b/bs4/tests/__init__.py @@ -1024,6 +1024,11 @@ class XMLTreeBuilderSmokeTest(TreeBuilderSmokeTest): soup = self.soup(markup) assert 'Sacr\xe9 bleu!' == soup.root.string + def test_can_parse_unicode_document_begining_with_bom(self): + markup = '\N{BYTE ORDER MARK}<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>' + soup = self.soup(markup) + assert 'Sacr\xe9 bleu!' == soup.root.string + def test_popping_namespaced_tag(self): markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>' soup = self.soup(markup) diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py index 1269e57..be954db 100644 --- a/bs4/tests/test_lxml.py +++ b/bs4/tests/test_lxml.py @@ -87,7 +87,7 @@ class TestLXMLTreeBuilder(SoupTest, HTMLTreeBuilderSmokeTest): @skipIf( not LXML_PRESENT, "lxml seems not to be present, not testing its XML tree builder.") -class LXMLXMLTreeBuilderSmokeTest(SoupTest, XMLTreeBuilderSmokeTest): +class TestLXMLXMLTreeBuilder(SoupTest, XMLTreeBuilderSmokeTest): """See ``HTMLTreeBuilderSmokeTest``.""" @property |