Experiment: tests: linkcheck: do not require 'freshenv' #14112
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Thanks to the output of
pytest's slowest-duration-tests output, as produced when the Sphinx test suite ran on Windows in GitHub Actions CI, I noticed that somelinkchecktests on Windows seem to be unexpectedly long-duration (reported as more than 4 seconds each).I'm curious whether this is due to the use of the
freshenv=Trueproject setup test parameter -- so I'm experimenting with unsetting thefresenvparameter for those tests here.The
linkchecktests in particular do seem to use it a lot in our testsuite:$ grep -rwc freshenv tests|grep -vw 0 tests/test_transforms/test_transforms_post_transforms.py:3 tests/test_ext_napoleon/test_ext_napoleon_docstring.py:1 tests/test_writers/test_docutilsconf.py:2 tests/test_markup/test_smartquotes.py:12 tests/test_extensions/test_ext_viewcode.py:4 tests/test_extensions/test_ext_todo.py:3 tests/test_extensions/test_ext_duration.py:8 tests/test_intl/test_intl.py:3 tests/test_domains/test_domain_py_pyobject.py:1 tests/test_domains/test_domain_js.py:1 tests/test_domains/test_domain_py.py:6 tests/test_domains/test_domain_py_canonical.py:1 tests/test_environment/test_environment_indexentries.py:8 tests/test_environment/test_environment.py:1 tests/test_command_line.py:3 tests/test_ext_autodoc/test_ext_autodoc_typehints.py:1 tests/test_search.py:3 tests/test_builders/test_build_warnings.py:4 tests/test_builders/test_build_latex.py:1 tests/test_builders/test_build_linkcheck.py:33 tests/test_builders/test_incremental_reading.py:2References