How to

Downstream conf.py

extensions = ["sphinx_autodoc_pytest_fixtures"]

pytest_fixture_lint_level = "warning"
pytest_fixture_external_links = {
    "db": "https://docs.example.com/testing#db",
}

sphinx_autodoc_pytest_fixtures automatically registers sphinx_ux_badges, sphinx_ux_autodoc_layout, and sphinx_autodoc_typehints_gp via app.setup_extension(). You do not need to add them separately to your extensions list.

Registered configuration values

pytest_fixture_hidden_dependencies
config env
config env
pytest_fixture_hidden_dependencies

Fixture names to hide from dependency tracking

Type:

frozenset

Default:
frozenset({'cache',
           'capfd',
           'capfdbinary',
           'capsysbinary',
           'pytestconfig',
           'pytester',
           'record_property',
           'record_testsuite_property',
           'record_xml_attribute',
           'recwarn',
           'testdir',
           'tmpdir'})
Registered by:

sphinx_autodoc_pytest_fixtures.setup()

Fallback URLs for pytest built-in fixtures

Type:

dict

Default:
{'caplog': 'https://docs.pytest.org/en/stable/reference/fixtures.html#caplog',
 'capsys': 'https://docs.pytest.org/en/stable/reference/fixtures.html#capsys',
 'monkeypatch': 'https://docs.pytest.org/en/stable/reference/fixtures.html#monkeypatch',
 'request': 'https://docs.pytest.org/en/stable/reference/fixtures.html#request',
 'tmp_path': 'https://docs.pytest.org/en/stable/reference/fixtures.html#tmp_path',
 'tmp_path_factory': 'https://docs.pytest.org/en/stable/reference/fixtures.html#tmp_path_factory'}
Registered by:

sphinx_autodoc_pytest_fixtures.setup()

Custom external fixture link URLs

Type:

dict

Default:

{}

Registered by:

sphinx_autodoc_pytest_fixtures.setup()

pytest_fixture_lint_level
config env
config env
pytest_fixture_lint_level

Validation severity: ‘none’, ‘warning’, or ‘error’

Type:

str

Default:

'warning'

Registered by:

sphinx_autodoc_pytest_fixtures.setup()