summaryrefslogtreecommitdiff
path: root/tests/roots/test-linkcheck
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-10 17:26:41 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-03-24 00:29:27 +0000
commit97f07ca83c70bba55fe1c1cb25993e5240e4187d (patch)
treedcdf7833f4b3222340cb8182a33e547d2709ab42 /tests/roots/test-linkcheck
parent9df3b59e004837e5cabfdab0948bd579a6f691a4 (diff)
downloadsphinx-git-97f07ca83c70bba55fe1c1cb25993e5240e4187d.tar.gz
Speed up ``test_linkcheck``
Diffstat (limited to 'tests/roots/test-linkcheck')
-rw-r--r--tests/roots/test-linkcheck/conf.py2
-rw-r--r--tests/roots/test-linkcheck/links.rst13
-rw-r--r--tests/roots/test-linkcheck/links.txt22
3 files changed, 14 insertions, 23 deletions
diff --git a/tests/roots/test-linkcheck/conf.py b/tests/roots/test-linkcheck/conf.py
index ac54f73b0..078329f6c 100644
--- a/tests/roots/test-linkcheck/conf.py
+++ b/tests/roots/test-linkcheck/conf.py
@@ -1,4 +1,4 @@
root_doc = 'links'
-source_suffix = '.txt'
exclude_patterns = ['_build']
linkcheck_anchors = True
+linkcheck_timeout = 0.01
diff --git a/tests/roots/test-linkcheck/links.rst b/tests/roots/test-linkcheck/links.rst
new file mode 100644
index 000000000..49afba2b3
--- /dev/null
+++ b/tests/roots/test-linkcheck/links.rst
@@ -0,0 +1,13 @@
+Some additional anchors to exercise ignore code
+
+* `Valid url <http://localhost:7777/>`_
+* `Bar anchor invalid (trailing slash) <http://localhost:7777/#!bar>`_
+* `Bar anchor invalid <http://localhost:7777#!bar>`_ tests that default ignore anchor of #! does not need to be prefixed with /
+* `Top anchor invalid <http://localhost:7777/#top>`_
+* `'does-not-exist' anchor invalid <http://localhost:7777#does-not-exist>`_
+* `Valid local file <conf.py>`_
+* `Invalid local file <path/to/notfound>`_
+
+.. image:: http://localhost:7777/image.png
+.. figure:: http://localhost:7777/image2.png
+
diff --git a/tests/roots/test-linkcheck/links.txt b/tests/roots/test-linkcheck/links.txt
deleted file mode 100644
index 1d2408401..000000000
--- a/tests/roots/test-linkcheck/links.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-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: `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/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>`_
-* https://github.com/sphinx-doc/sphinx/blob/master/sphinx/__init__.py#L2
-
-.. image:: https://www.google.com/image.png
-.. figure:: https://www.google.com/image2.png
-
-.. raw:: html
- :url: https://www.sphinx-doc.org/