Skip to content

Commit 76a933b

Browse files
befelemehumitos
andauthored
Adjust the expected test_basic output to match Sphinx 7.3+ (#1572)
The previous behavior was deemed a bug and fixed in sphinx-doc/sphinx#11970 Closes #1558 Co-authored-by: Manuel Kaufmann <[email protected]>
1 parent 357e76d commit 76a933b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_builders.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ def test_basic():
3737
)
3838
assert search in content
3939
elif isinstance(app.builder, SingleFileHTMLBuilder):
40+
internal_ref = '#document-foo'
41+
if sphinx.version_info[:3] < (7, 3, 0):
42+
internal_ref = 'index.html' + internal_ref
4043
search = (
4144
'<ul>\n'
4245
'<li class="toctree-l1">'
43-
'<a class="reference internal" href="index.html#document-foo">foo</a>'
46+
f'<a class="reference internal" href="{internal_ref}">foo</a>'
4447
'</li>\n'
4548
'</ul>'
4649
)

0 commit comments

Comments
 (0)