Commit c9e5b65
committed
test(_ext[sphinx_pytest_fixtures]): add unit tests for extension submodules
why: Each extension submodule (_detection, _metadata, _store, _badges,
_directives, _validation, _index) has branching logic and edge cases
that must be tested in isolation without requiring full Sphinx builds.
what:
- 1,385 lines of pytest tests covering:
- _is_pytest_fixture positive/negative detection
- _get_user_deps filtering of hidden and builtin fixtures
- _classify_deps partitioning into internal, builtin, external
- _get_return_annotation with typing generics and forward refs
- _is_factory heuristic for type[X] and Callable returns
- _build_usage_snippet for resource, factory, override_hook kinds
- _build_badge_group_node for scope/kind/autouse/deprecated badges
- _qualify_forward_ref with TYPE_CHECKING block resolution
- _extract_summary sentence boundary and EOF handling
- _extract_teardown_summary from Teardown docstring sections
- SPF001–SPF009 validation warnings and error-level lint
- FixtureMeta.param_reprs wiring from :params: directive option
- Store env_version guard and docname collision detection
- CSS class contract tests and tabindex accessibility
- Index table Flags column badge rendering1 parent ecaa0e8 commit c9e5b65
1 file changed
Lines changed: 1385 additions & 0 deletions
0 commit comments