We have no html5lib packaged yet.
--- sphinxcontrib_htmlhelp-2.1.0/tests/test_htmlhelp.py.orig
+++ sphinxcontrib_htmlhelp-2.1.0/tests/test_htmlhelp.py
@@ -7,7 +7,6 @@
from typing import TYPE_CHECKING
import pytest
-from html5lib import HTMLParser
from sphinx.config import Config
from sphinxcontrib.htmlhelp import chm_htmlescape, default_htmlhelp_basename
@@ -73,52 +72,6 @@
assert m is None, 'Hex escaping exists in .hhk file: ' + str(m.group(0))
-@pytest.mark.sphinx('htmlhelp', testroot='hhc')
-def test_htmlhelp_hhc(app: Sphinx) -> None:
- app.build()
-
- def assert_sitemap(node: Element, name: str, filename: str) -> None:
- assert node.tag == 'object'
- assert len(node) == 2
- assert node[0].tag == 'param'
- assert node[0].attrib == {'name': 'Name', 'value': name}
- assert node[1].tag == 'param'
- assert node[1].attrib == {'name': 'Local', 'value': filename}
-
- # .hhc file
- hhc = (app.outdir / 'pythondoc.hhc').read_text(encoding='utf-8')
- tree = HTMLParser(namespaceHTMLElements=False).parse(hhc)
- items = tree.find('.//body/ul')
- assert len(items) == 4
-
- # index
- assert items[0].tag == 'li'
- assert len(items[0]) == 1
- assert_sitemap(items[0][0], "Sphinx's documentation", 'index.html')
-
- # py-modindex
- assert items[1].tag == 'li'
- assert len(items[1]) == 1
- assert_sitemap(items[1][0], 'Python Module Index', 'py-modindex.html')
-
- # toctree
- assert items[2].tag == 'li'
- assert len(items[2]) == 2
- assert_sitemap(items[2][0], 'foo', 'foo.html')
-
- assert items[2][1].tag == 'ul'
- assert len(items[2][1]) == 1
- assert items[2][1][0].tag == 'li'
- assert_sitemap(items[2][1][0][0], 'bar', 'bar.html')
-
- assert items[3].tag == 'li'
- assert len(items[3]) == 1
- assert_sitemap(items[3][0], 'baz', 'baz.html')
-
- # single quotes should be escaped as decimal (')
- assert "Sphinx's documentation" in hhc
-
-
def test_chm_htmlescape() -> None:
assert chm_htmlescape('Hello world') == 'Hello world'
assert chm_htmlescape('Unicode 文字') == 'Unicode 文字'
--- sphinxcontrib_htmlhelp-2.1.0/pyproject.toml.orig
+++ sphinxcontrib_htmlhelp-2.1.0/pyproject.toml
@@ -45,7 +45,6 @@
[project.optional-dependencies]
test = [
"pytest",
- "html5lib",
]
lint = [
"ruff==0.5.5",