mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
linkcheck: Make the new 'timeout' status opt-in (#12023)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
@@ -856,7 +856,13 @@ def test_too_many_requests_retry_after_without_header(app, capsys):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)
|
||||
@pytest.mark.sphinx(
|
||||
'linkcheck', testroot='linkcheck-localserver', freshenv=True,
|
||||
confoverrides={
|
||||
'linkcheck_report_timeouts_as_broken': False,
|
||||
'linkcheck_timeout': 0.01,
|
||||
}
|
||||
)
|
||||
def test_requests_timeout(app):
|
||||
class DelayedResponseHandler(BaseHTTPRequestHandler):
|
||||
protocol_version = "HTTP/1.1"
|
||||
@@ -867,7 +873,6 @@ def test_requests_timeout(app):
|
||||
self.send_header("Content-Length", "0")
|
||||
self.end_headers()
|
||||
|
||||
app.config.linkcheck_timeout = 0.01
|
||||
with serve_application(app, DelayedResponseHandler):
|
||||
app.build()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user