Skip to content

Reduce autodoc test duration by up to four times#14039

Merged
AA-Turner merged 2 commits intosphinx-doc:masterfrom
AA-Turner:autodoc/faster-tests
Nov 6, 2025
Merged

Reduce autodoc test duration by up to four times#14039
AA-Turner merged 2 commits intosphinx-doc:masterfrom
AA-Turner:autodoc/faster-tests

Conversation

@AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Nov 6, 2025

We construct and use _AutodocConfig, EventManager, etc instances ourselves in the tests rather than using the (slow) pytest.mark.sphinx() / app fixture injection. On repeated benchmarks I get a speed-up of ~3.8-4.4x, from ~24.9s to ~6.0s.

A

References

@AA-Turner AA-Turner changed the title Reduce autodoc test duration by up to six times Reduce autodoc test duration by up to four times Nov 6, 2025
@AA-Turner
Copy link
Member Author

Python 3.15 failures appear unrelated, in tests/test_command_line.py::test_make_mode_parse_arguments_...

A

@AA-Turner AA-Turner merged commit b9d5d2b into sphinx-doc:master Nov 6, 2025
27 of 30 checks passed
@AA-Turner AA-Turner deleted the autodoc/faster-tests branch November 6, 2025 03:18
@AA-Turner AA-Turner added this to the 9.0.0 milestone Nov 25, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant