Skip to content

Commit 1a0d9ed

Browse files
authored
Update test_build_linkcheck.py
1 parent ac12d63 commit 1a0d9ed

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tests/test_builders/test_build_linkcheck.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,30 +1564,3 @@ def mock_request(self, method, url, **kwargs):
15641564
if lowercase_uri in rowsby:
15651565
# Should be working because case is ignored
15661566
assert rowsby[lowercase_uri]['status'] == 'working'
1567-
1568-
1569-
@pytest.mark.sphinx(
1570-
'linkcheck',
1571-
testroot='linkcheck-localserver-anchor',
1572-
freshenv=True,
1573-
confoverrides={'linkcheck_ignore_case': True},
1574-
)
1575-
def test_linkcheck_anchors_case_insensitive(app: SphinxTestApp) -> None:
1576-
"""Test that linkcheck_ignore_case=True ignores case differences in anchors."""
1577-
with serve_application(app, CaseSensitiveHandler) as address:
1578-
# Create a document with an anchor in lowercase
1579-
index = app.srcdir / 'index.rst'
1580-
index.write_text(
1581-
f'* `Link with anchor <http://{address}/anchor.html#myanchor>`_\n',
1582-
encoding='utf-8',
1583-
)
1584-
app.build()
1585-
1586-
content = (app.outdir / 'output.json').read_text(encoding='utf8')
1587-
rows = [json.loads(x) for x in content.splitlines()]
1588-
1589-
# The HTML has "MyAnchor" but we request "myanchor"
1590-
# With ignore_case=True, this should work
1591-
assert len(rows) == 1
1592-
assert rows[0]['status'] == 'working'
1593-
assert rows[0]['uri'] == f'http://{address}/anchor.html#myanchor'

0 commit comments

Comments
 (0)