https://sources.debian.org/data/main/s/soupsieve/2.2.1-2/debian/patches/libxml2-2.9.11
https://github.com/facelessuser/soupsieve/issues/220

Apply Debian patch to skip tests which expose a lxml bug that's
already being handled elsewhere.

From: Stefano Rivera <stefanor@debian.org>
Date: Sat, 2 Oct 2021 12:05:17 -0700
Subject: Mark test_contains_cdata_html tests XFAIL for libxml2 >= 2.9.11

libxml2 changed CDATA handling in 2.9.11.
Beautifulsoup supports this change, but lxml upstream has pinned on an
older version so the behaviour change isn't standardised upstream, yet.

Bug-upstream: https://github.com/facelessuser/soupsieve/issues/220
Bug-lxml: https://bugs.launchpad.net/lxml/+bug/1928795
Bug-beautifulsoup: https://bugs.launchpad.net/beautifulsoup/+bug/1930164
Bug-Debian: https://bugs.debian.org/995459

Forwarded: no
--- a/tests/test_extra/test_soup_contains.py
+++ b/tests/test_extra/test_soup_contains.py
@@ -3,6 +3,9 @@ from .. import util
 import warnings
 import soupsieve as sv
 
+import pytest
+from lxml.etree import LIBXML_VERSION
+
 
 class TestSoupContains(util.TestCase):
     """Test soup-contains selectors."""
@@ -144,6 +147,9 @@ class TestSoupContains(util.TestCase):
             flags=util.HTML
         )
 
+    @pytest.mark.xfail(LIBXML_VERSION >= (2, 9, 11),
+        reason='lxml parser changed CDATA handling, see '
+               'https://github.com/facelessuser/soupsieve/issues/220')
     def test_contains_cdata_html(self):
         """Test contains CDATA in HTML5."""
 
--- a/tests/test_extra/test_soup_contains_own.py
+++ b/tests/test_extra/test_soup_contains_own.py
@@ -1,6 +1,9 @@
 """Test contains selectors."""
 from .. import util
 
+import pytest
+from lxml.etree import LIBXML_VERSION
+
 
 class TestSoupContainsOwn(util.TestCase):
     """Test soup-contains-own selectors."""
@@ -35,6 +38,9 @@ class TestSoupContainsOwn(util.TestCase):
             flags=util.HTML
         )
 
+    @pytest.mark.xfail(LIBXML_VERSION >= (2, 9, 11),
+        reason='lxml parser changed CDATA handling, see '
+               'https://github.com/facelessuser/soupsieve/issues/220')
     def test_contains_own_cdata_html(self):
         """Test contains CDATA in HTML5."""
 
