Add a test helper to run within a Sphinx environment.

Review Request #12516 — Created Aug. 8, 2022 and submitted — Latest diff uploaded

Information

beanbag-docutils
master

Reviewers

This adds SphinxExtTestCase.with_sphinx_env(), a context manager that
sets up a Sphinx test environment and allows a caller to run within its
context.

It's a simplified version of the sphinx_testing.with_app() helper,
which was a bit too rigid for our uses.

The BeanbagDocstring tests now run within this environment, which will
be important for upcoming changes.

All unit tests pass.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Add a test helper to run within a Sphinx environment.
This adds `SphinxExtTestCase.with_sphinx_env()`, a context manager that sets up a Sphinx test environment and allows a caller to run within its context. It's a simplified version of the `sphinx_testing.with_app()` helper, which was a bit too rigid for our uses. The `BeanbagDocstring` tests now run within this environment, which will be important for upcoming changes.
5cec43b45d363d00b0b1a163d86afac1b7bd6841 Christian Hammond
beanbag_docutils/sphinx/ext/tests/test_autodoc_utils.py
beanbag_docutils/sphinx/ext/tests/testcase.py
Loading...