From 4305d11facf0c0c088e4b27794f524344e6221f2 Mon Sep 17 00:00:00 2001 From: James Addison Date: Tue, 18 Apr 2023 18:35:27 +0100 Subject: [PATCH] Unit tests: linkcheck: configure a single linkcheck worker during 'test_defaults' test case With thanks to @picnixz for mentioning this configuration setting: https://github.com/sphinx-doc/sphinx/issues/11324#issuecomment-1511193722 --- tests/roots/test-linkcheck/conf.py | 1 + tests/test_build_linkcheck.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/roots/test-linkcheck/conf.py b/tests/roots/test-linkcheck/conf.py index 6ddb41a5d01..1da919b5225 100644 --- a/tests/roots/test-linkcheck/conf.py +++ b/tests/roots/test-linkcheck/conf.py @@ -2,3 +2,4 @@ exclude_patterns = ['_build'] linkcheck_anchors = True linkcheck_timeout = 0.05 +linkcheck_workers = 1 diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 8538d06d0e6..a2a1f07fb33 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -99,7 +99,7 @@ def test_defaults(app): with http_server(DefaultsHandler): with ConnectionMeasurement() as m: app.build() - assert m.connection_count == 5 + assert m.connection_count == 1 # Text output assert (app.outdir / 'output.txt').exists()