mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[tests] linkcheck: add test coverage for behaviour of a locally-existing file. (#12128)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
@@ -116,7 +116,7 @@ def test_defaults(app):
|
||||
# images should fail
|
||||
assert "Not Found for url: http://localhost:7777/image.png" in content
|
||||
assert "Not Found for url: http://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
|
||||
|
||||
@@ -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["http://localhost:7777#!bar"] == {
|
||||
'filename': 'links.rst',
|
||||
'lineno': 5,
|
||||
|
||||
Reference in New Issue
Block a user