Adjust the expected test_basic output to match Sphinx 7.3+ (#1572)

The previous behavior was deemed a bug and fixed in
https://github.com/sphinx-doc/sphinx/pull/11970

Closes #1558

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
This commit is contained in:
Karolina Surma 2024-07-15 15:16:39 +02:00 committed by GitHub
parent 357e76dc42
commit 76a933b997
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,10 +37,13 @@ def test_basic():
)
assert search in content
elif isinstance(app.builder, SingleFileHTMLBuilder):
internal_ref = '#document-foo'
if sphinx.version_info[:3] < (7, 3, 0):
internal_ref = 'index.html' + internal_ref
search = (
'<ul>\n'
'<li class="toctree-l1">'
'<a class="reference internal" href="index.html#document-foo">foo</a>'
f'<a class="reference internal" href="{internal_ref}">foo</a>'
'</li>\n'
'</ul>'
)