Skip to content

Commit

Permalink
Tests: fixup: use Python-supported XPath subset, and rename function
Browse files Browse the repository at this point in the history
Relates-to commit 295ee97.
  • Loading branch information
jayaddison committed Sep 5, 2024
1 parent 295ee97 commit 2233c16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_builders/test_build_html_5_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from xml.etree.ElementTree import Element


def _symbolic_hyperlink_check(nodes: Sequence[Element]) -> None:
def _symbolic_link_check(nodes: Sequence[Element]) -> None:
"""Confirm that a series of nodes are HTML hyperlinks represented by individual symbols"""
assert nodes, 'Expected at least one node to check'
_ = locale.get_translation('sphinx')
Expand Down Expand Up @@ -495,7 +495,7 @@ def checker(nodes: Iterable[Element]) -> Literal[True]:
('genindex.html', './/a/strong', 'Other'),
('genindex.html', './/a', 'entry'),
('genindex.html', './/li/a', 'double'),
('genindex.html', './/div[@class~="jumpbox"]/a', _symbolic_hyperlink_check),
('genindex.html', './/div[@class="genindex-jumpbox"]/a', _symbolic_link_check),
('otherext.html', './/h1', 'Generated section'),
('otherext.html', ".//a[@href='_sources/otherext.foo.txt']", ''),
('search.html', ".//meta[@name='robots'][@content='noindex']", ''),
Expand Down

0 comments on commit 2233c16

Please sign in to comment.