linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / xmlsec / reset-lxml-in-tests.patch
blob0968583faa63dfe27d8cf4a4bedcbd73836fe171
1 diff --git a/tests/base.py b/tests/base.py
2 index b05de1d..5ec356f 100644
3 --- a/tests/base.py
4 +++ b/tests/base.py
5 @@ -94,6 +94,7 @@ class TestMemoryLeaks(unittest.TestCase):
7 def load_xml(self, name, xpath=None):
8 """returns xml.etree"""
9 + etree.set_default_parser(parser=etree.XMLParser())
10 root = etree.parse(self.path(name)).getroot()
11 if xpath is None:
12 return root
13 diff --git a/tests/test_doc_examples.py b/tests/test_doc_examples.py
14 index 2fc490f..53d2377 100644
15 --- a/tests/test_doc_examples.py
16 +++ b/tests/test_doc_examples.py
17 @@ -42,3 +42,5 @@ def test_doc_example(example):
18 """
19 with cd(example.parent):
20 runpy.run_path(str(example))
21 + from lxml import etree
22 + etree.set_default_parser(parser=etree.XMLParser())