From e787fbb13962f63137eedd484a4f33aa946e938f Mon Sep 17 00:00:00 2001 From: MeGaurav4 Date: Mon, 29 Jun 2026 19:31:12 +0530 Subject: [PATCH] test: address Adrian+syncrain PR feedback - remove first docstring line (Adrian: unnecessary) - replace weak isinstance assert with no-op call - keep Cython function mention (Adrian: wording is great) --- tests/test_utils_sitemap.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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;"))