Option C Tools
Loading...
Searching...
No Matches
tests_docs.test_find_packages Namespace Reference

Functions

None _mkpkg (Path path)
None test_find_packages_depth_1 (Path tmp_path)
None test_find_packages_depth_2_nested_project (Path tmp_path)
None test_find_packages_depth_3_src_layout (Path tmp_path)
None test_find_packages_stops_at_package (Path tmp_path)
None test_find_packages_respects_exclusions (Path tmp_path)
None test_find_packages_max_depth_safety (Path tmp_path)
None test_find_packages_autodoc_modules_override (Path tmp_path)
None test_find_packages_multiple_siblings (Path tmp_path)

Detailed Description

Purpose
-------
Validate the OI-426 recursive package discovery in
``oct.docs.oct_docs._find_packages``.

Responsibilities
----------------
- Confirm depth-1 and depth-2 cases continue to work (backward compat).
- Confirm depth-3+ cases now resolve (new capability).
- Confirm walker stops at the first ``__init__.py`` (autodoc handles descent).
- Confirm ``LINTER_EXCLUDE_DIRS`` / ``WILDCARD_EXCLUDE_DIRS`` are respected.
- Confirm the ``_MAX_PACKAGE_DEPTH`` safety cap prevents runaway walks.
- Confirm the explicit ``autodoc_modules`` override path is unchanged.

Diagnostics
-----------
Domain: DOCS-TESTS
L2: test lifecycle
L3: assertion details
L4: deep tracing

Contracts
---------
Inputs:  tmp_path pytest fixture
Outputs: pass/fail assertions

Function Documentation

◆ _mkpkg()

None tests_docs.test_find_packages._mkpkg ( Path path)
protected

Definition at line 40 of file test_find_packages.py.

Here is the caller graph for this function:

◆ test_find_packages_autodoc_modules_override()

None tests_docs.test_find_packages.test_find_packages_autodoc_modules_override ( Path tmp_path)
Explicit ``autodoc_modules`` config bypasses the walker.

Definition at line 107 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_depth_1()

None tests_docs.test_find_packages.test_find_packages_depth_1 ( Path tmp_path)
Backward compat: a top-level package is discovered.

Definition at line 45 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_depth_2_nested_project()

None tests_docs.test_find_packages.test_find_packages_depth_2_nested_project ( Path tmp_path)
Backward compat: ``oct/oct/__init__.py`` resolves to the inner dir.

Definition at line 54 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_depth_3_src_layout()

None tests_docs.test_find_packages.test_find_packages_depth_3_src_layout ( Path tmp_path)
New capability: ``src/mypkg/__init__.py`` is now discovered.

Definition at line 64 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_max_depth_safety()

None tests_docs.test_find_packages.test_find_packages_max_depth_safety ( Path tmp_path)
A 15-deep empty tree returns [] and does not raise.

Definition at line 94 of file test_find_packages.py.

◆ test_find_packages_multiple_siblings()

None tests_docs.test_find_packages.test_find_packages_multiple_siblings ( Path tmp_path)
Multiple top-level packages are all discovered.

Definition at line 119 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_respects_exclusions()

None tests_docs.test_find_packages.test_find_packages_respects_exclusions ( Path tmp_path)
Hidden / excluded directories are skipped.

Definition at line 84 of file test_find_packages.py.

Here is the call graph for this function:

◆ test_find_packages_stops_at_package()

None tests_docs.test_find_packages.test_find_packages_stops_at_package ( Path tmp_path)
Subpackages under a discovered package must not be listed.

Definition at line 74 of file test_find_packages.py.

Here is the call graph for this function: