Experiment: tests: linkcheck: do not require 'freshenv'#14112
Experiment: tests: linkcheck: do not require 'freshenv'#14112jayaddison wants to merge 1 commit intosphinx-doc:masterfrom
Conversation
|
Removing the |
|
@jayaddison could we just decouple the tests from Sphinx? As I see it there are two parts: that the links are properly detected from source files (requires Sphinx) and that links are properly marked as working/otherwise. See the recent changes to the autodoc tests where most tests no longer require the A |
|
@AA-Turner that sounds worthwhile, although I haven't completely gotten my head around how to separate those two aspects of the tests yet. I think b9d5d2b looks like one of the refactors you mention, though? (test-performance-related, going by the commit message, and removes the |
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