diff --git a/tests/test_utils_sitemap.py b/tests/test_utils_sitemap.py index e9cdd8e17..86478e8ee 100644 --- a/tests/test_utils_sitemap.py +++ b/tests/test_utils_sitemap.py @@ -314,13 +314,10 @@ def test_xml_entity_expansion(): def test_sitemap_non_string_tag(): - """Regression test for non-string elem.tag crashing _get_tag_name. - - With recover=True and resolve_entities=False, libxml2 >= 2.14.6 (used + """With recover=True and resolve_entities=False, libxml2 >= 2.14.6 (used by lxml >= 6.1.1) preserves undeclared entity reference nodes whose - .tag is a non-string `Cython function` object instead of a str. + .tag is a non-string ``Cython function`` object instead of a ``str``. _get_tag_name must handle this gracefully instead of raising AttributeError. """ - results = list(Sitemap(b"&k;")) - assert isinstance(results, list) + list(Sitemap(b"&k;"))