summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-10-11 14:21:45 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2012-10-11 14:21:45 -0400
commitea02ddabe83fc0440566e1060b2dfb7937dd8503 (patch)
tree94170d9684f6506faeeb984393f667cfcc269d6d /bs4/testing.py
parent648f85338d8a3f4e88dd362cddc31d4cae8a4a24 (diff)
downloadbeautifulsoup4-ea02ddabe83fc0440566e1060b2dfb7937dd8503.tar.gz
Fix a bug in the lxml treebuilder which crashed when a tag included
an attribute from the predefined xml: namespace. [bug=1065617]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index 0f052eb..1a92af4 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -501,6 +501,11 @@ class XMLTreeBuilderSmokeTest(object):
soup = self.soup(markup)
self.assertEqual(unicode(soup.foo), markup)
+ def test_namespaced_attributes_xml_namespace(self):
+ markup = '<foo xml:lang="fr">bar</foo>'
+ soup = self.soup(markup)
+ self.assertEqual(unicode(soup.foo), markup)
+
class HTML5TreeBuilderSmokeTest(HTMLTreeBuilderSmokeTest):
"""Smoke test for a tree builder that supports HTML5."""