- Add patch skip-test-under-libxml2-2.10.4.patch:

* Skip a test if using libxml2 >= 2.10.4

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=175
This commit is contained in:
Steve Kowalik 2023-04-19 04:53:05 +00:00 committed by Git OBS Bridge
parent 72389f829a
commit 7816ca5659
3 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 19 04:52:01 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch skip-test-under-libxml2-2.10.4.patch:
* Skip a test if using libxml2 >= 2.10.4
-------------------------------------------------------------------
Thu Feb 16 20:17:22 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -29,6 +29,9 @@ Source99: python-lxml.rpmlintrc
# PATCH-FIX-UPSTREAM close_file_before_test.patch bsc#1206555 mcepl@suse.com
# make sure the testing data are flushed to the file
Patch0: close_file_before_test.patch
# PATCH-FIX-OPENSUSE Skip a test under libxml2 2.10.4+
# https://bugs.launchpad.net/lxml/+bug/2016939
Patch1: skip-test-under-libxml2-2.10.4.patch
BuildRequires: %{python_module Cython >= 0.29.7}
BuildRequires: %{python_module base}
BuildRequires: %{python_module cssselect >= 0.9.1}

View File

@ -0,0 +1,12 @@
Index: lxml-4.9.2/src/lxml/tests/test_etree.py
===================================================================
--- lxml-4.9.2.orig/src/lxml/tests/test_etree.py
+++ lxml-4.9.2/src/lxml/tests/test_etree.py
@@ -3068,6 +3068,7 @@ class ETreeOnlyTestCase(HelperTestCase):
self.assertEqual(re, e.nsmap)
self.assertEqual(r, s.nsmap)
+ @unittest.skipIf(etree.LIBXML_VERSION >= (2, 10, 4), "libxml2 regression ignores namespaces")
def test_html_prefix_nsmap(self):
etree = self.etree
el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')