Skip to content

Commit

Permalink
Adapt a test to a behavioural change in libxml2 2.9.11+.
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed May 18, 2021
1 parent 0faced0 commit 852ed10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lxml/tests/test_etree.py
Expand Up @@ -3036,7 +3036,10 @@ def test_subelement_nsmap(self):
def test_html_prefix_nsmap(self):
etree = self.etree
el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')
self.assertEqual({'hha': None}, el.nsmap)
if etree.LIBXML_VERSION < (2, 9, 11):
self.assertEqual({'hha': None}, el.nsmap)
else:
self.assertEqual({}, el.nsmap)

def test_getchildren(self):
Element = self.etree.Element
Expand Down

0 comments on commit 852ed10

Please sign in to comment.