summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-27 17:25:58 +0900
committerGitHub <noreply@github.com>2021-03-27 17:25:58 +0900
commit6a873cae0ba40448c5fba59472b60c761d4a5b0d (patch)
treeb416e665f4ac6ae792186614a26e8ac43652cb33
parent14ff1bcf72d17b7ed9ed074f5a2e56da8dc56dcc (diff)
parent26d9a8962ec21c1bbe8b2d90a4d7f3e6f7c25bc8 (diff)
downloadsphinx-git-6a873cae0ba40448c5fba59472b60c761d4a5b0d.tar.gz
Merge pull request #9038 from tk0miya/fix_linkcheck_ci
Fix the testcase for linkcheck refers removed URLs
-rw-r--r--tests/roots/test-linkcheck/links.txt4
-rw-r--r--tests/test_build_linkcheck.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/roots/test-linkcheck/links.txt b/tests/roots/test-linkcheck/links.txt
index 90759ee63..b389414c9 100644
--- a/tests/roots/test-linkcheck/links.txt
+++ b/tests/roots/test-linkcheck/links.txt
@@ -2,14 +2,14 @@ This is from CPython documentation.
* Also, if there is a `default namespace <https://www.w3.org/TR/2006/REC-xml-names-20060816/#defaulting>`__, that full URI gets prepended to all of the non-prefixed tags.
-* The URL having anchor: `http://www.sphinx-doc.org/en/1.4.8/tutorial.html#install-sphinx`_
+* The URL having anchor: `https://www.sphinx-doc.org/en/master/usage/installation.html#overview`_
Some additional anchors to exercise ignore code
* `Example Bar invalid <https://www.google.com/#!bar>`_
* `Example Bar invalid <https://www.google.com#!bar>`_ tests that default ignore anchor of #! does not need to be prefixed with /
* `Example Bar invalid <https://www.google.com/#top>`_
-* `Example anchor invalid <http://www.sphinx-doc.org/en/1.7/intro.html#does-not-exist>`_
+* `Example anchor invalid <http://www.sphinx-doc.org/en/master/index.html#does-not-exist>`_
* `Complete nonsense <https://localhost:7777/doesnotexist>`_
* `Example valid local file <conf.py>`_
* `Example invalid local file <path/to/notfound>`_
diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py
index 723ace19b..fd7a5482a 100644
--- a/tests/test_build_linkcheck.py
+++ b/tests/test_build_linkcheck.py
@@ -97,7 +97,7 @@ def test_defaults_json(app):
assert "Anchor 'top' not found" == \
rowsby["https://www.google.com/#top"]["info"]
assert "Anchor 'does-not-exist' not found" == \
- rowsby["http://www.sphinx-doc.org/en/1.7/intro.html#does-not-exist"]["info"]
+ rowsby["http://www.sphinx-doc.org/en/master/index.html#does-not-exist"]["info"]
# images should fail
assert "Not Found for url: https://www.google.com/image.png" in \
rowsby["https://www.google.com/image.png"]["info"]
@@ -108,7 +108,7 @@ def test_defaults_json(app):
confoverrides={'linkcheck_anchors_ignore': ["^!", "^top$"],
'linkcheck_ignore': [
'https://localhost:7777/doesnotexist',
- 'http://www.sphinx-doc.org/en/1.7/intro.html#',
+ 'http://www.sphinx-doc.org/en/master/index.html#',
'https://www.google.com/image.png',
'https://www.google.com/image2.png',
'path/to/notfound']