Skip to content

Commit

Permalink
[tests] linkcheck: add test coverage for behaviour of a locally-exist…
Browse files Browse the repository at this point in the history
…ing file. (#12128)

Co-authored-by: Bénédikt Tran <[email protected]>
  • Loading branch information
jayaddison and picnixz committed Mar 18, 2024
1 parent a9383a0 commit 7894b5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_builders/test_build_linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_defaults(app):
# images should fail
assert "Not Found for url: https://localhost:7777/image.png" in content
assert "Not Found for url: https://localhost:7777/image2.png" in content
# looking for local file should fail
# looking for missing local file should fail
assert "[broken] path/to/notfound" in content
assert len(content.splitlines()) == 5

Expand All @@ -134,6 +134,8 @@ def test_defaults(app):
# the output order of the rows is not stable
# due to possible variance in network latency
rowsby = {row["uri"]: row for row in rows}
# looking for local file that exists should succeed
assert rowsby["conf.py"]["status"] == "working"
assert rowsby["https://localhost:7777#!bar"] == {
'filename': 'links.rst',
'lineno': 5,
Expand Down

0 comments on commit 7894b5a

Please sign in to comment.