Testing API¶
Added in version 1.6.
Utility functions and pytest fixtures for testing
are provided in sphinx.testing.
If you are a developer of Sphinx extensions,
you can write unit tests with pytest.
pytest configuration¶
To use pytest fixtures that are provided by sphinx.testing,
add the 'sphinx.testing.fixtures' plugin
to your test modules or conftest.py files as follows:
pytest_plugins = ('sphinx.testing.fixtures',)
Usage¶
If you want to know more detailed usage,
please refer to tests/conftest.py and other test_*.py files
under the tests/ directory.