Skip to content

Commit

Permalink
test_linkcheck_allowed_redirects: reduce the number of HTTP round-tri…
Browse files Browse the repository at this point in the history
…ps by enabling support for HEAD requests

This is intended to reduce the number of HTTP requests within this particular test to closer-to-the-norm compared to other tests within the test_build_linkcheck.py module; this test has been failing intermittently and it seems possible that timeouts due to HTTP roundtrip traffic are a contributing factor.
  • Loading branch information
jayaddison committed Apr 13, 2023
1 parent 509cc45 commit c2d5bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_build_linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def test_follows_redirects_on_GET(app, capsys, warning):
'linkcheck_allowed_redirects': {'http://localhost:7777/.*1': '.*'},
})
def test_linkcheck_allowed_redirects(app, warning):
with http_server(make_redirect_handler(support_head=False)):
with http_server(make_redirect_handler(support_head=True)):
app.build()

with open(app.outdir / 'output.json', encoding='utf-8') as fp:
Expand Down

0 comments on commit c2d5bef

Please sign in to comment.