forked from pool/python-lxml
Accepting request 896722 from home:pmonrealgonzalez:branches:devel:languages:python
- Adapt test_etree.py to a behavioural change in libxml2 2.9.11+ * Add python-lxml-test_etree.patch OBS-URL: https://build.opensuse.org/request/show/896722 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=147
This commit is contained in:
25
python-lxml-test_etree.patch
Normal file
25
python-lxml-test_etree.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 852ed1092bd80b6b9a51db24371047ec88843031 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Tue, 18 May 2021 22:02:02 +0200
|
||||
Subject: [PATCH] Adapt a test to a behavioural change in libxml2 2.9.11+.
|
||||
|
||||
---
|
||||
src/lxml/tests/test_etree.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
|
||||
index 9cf70604b..42613dcbe 100644
|
||||
--- a/src/lxml/tests/test_etree.py
|
||||
+++ b/src/lxml/tests/test_etree.py
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user