python/coverage: update to 7.6.5
[oi-userland.git] / components / python / sphinxcontrib_htmlhelp / patches / 02-no-html5lib.patch
blob8f90622aaf3cd7dedc4499ee40e55aa4755207aa
1 We have no html5lib packaged yet.
3 --- sphinxcontrib_htmlhelp-2.1.0/tests/test_htmlhelp.py.orig
4 +++ sphinxcontrib_htmlhelp-2.1.0/tests/test_htmlhelp.py
5 @@ -7,7 +7,6 @@
6 from typing import TYPE_CHECKING
8 import pytest
9 -from html5lib import HTMLParser
10 from sphinx.config import Config
12 from sphinxcontrib.htmlhelp import chm_htmlescape, default_htmlhelp_basename
13 @@ -73,52 +72,6 @@
14 assert m is None, 'Hex escaping exists in .hhk file: ' + str(m.group(0))
17 -@pytest.mark.sphinx('htmlhelp', testroot='hhc')
18 -def test_htmlhelp_hhc(app: Sphinx) -> None:
19 - app.build()
21 - def assert_sitemap(node: Element, name: str, filename: str) -> None:
22 - assert node.tag == 'object'
23 - assert len(node) == 2
24 - assert node[0].tag == 'param'
25 - assert node[0].attrib == {'name': 'Name', 'value': name}
26 - assert node[1].tag == 'param'
27 - assert node[1].attrib == {'name': 'Local', 'value': filename}
29 - # .hhc file
30 - hhc = (app.outdir / 'pythondoc.hhc').read_text(encoding='utf-8')
31 - tree = HTMLParser(namespaceHTMLElements=False).parse(hhc)
32 - items = tree.find('.//body/ul')
33 - assert len(items) == 4
35 - # index
36 - assert items[0].tag == 'li'
37 - assert len(items[0]) == 1
38 - assert_sitemap(items[0][0], "Sphinx's documentation", 'index.html')
40 - # py-modindex
41 - assert items[1].tag == 'li'
42 - assert len(items[1]) == 1
43 - assert_sitemap(items[1][0], 'Python Module Index', 'py-modindex.html')
45 - # toctree
46 - assert items[2].tag == 'li'
47 - assert len(items[2]) == 2
48 - assert_sitemap(items[2][0], 'foo', 'foo.html')
50 - assert items[2][1].tag == 'ul'
51 - assert len(items[2][1]) == 1
52 - assert items[2][1][0].tag == 'li'
53 - assert_sitemap(items[2][1][0][0], 'bar', 'bar.html')
55 - assert items[3].tag == 'li'
56 - assert len(items[3]) == 1
57 - assert_sitemap(items[3][0], 'baz', 'baz.html')
59 - # single quotes should be escaped as decimal (')
60 - assert "Sphinx's documentation" in hhc
63 def test_chm_htmlescape() -> None:
64 assert chm_htmlescape('Hello world') == 'Hello world'
65 assert chm_htmlescape('Unicode 文字') == 'Unicode 文字'
66 --- sphinxcontrib_htmlhelp-2.1.0/pyproject.toml.orig
67 +++ sphinxcontrib_htmlhelp-2.1.0/pyproject.toml
68 @@ -45,7 +45,6 @@
69 [project.optional-dependencies]
70 test = [
71 "pytest",
72 - "html5lib",
74 lint = [
75 "ruff==0.5.5",