Can use Sphinx fixtures: https://github.com/sphinx-doc/sphinx/blob/766900e416af3ec9665e0df3260812b1e4d9c72b/sphinx/testing/fixtures.py