Option C Tools
Loading...
Searching...
No Matches
tests_core.test_project_root Namespace Reference

Functions

 test_validate_path_containment_inside_passes (tmp_path)
 test_validate_path_containment_outside_raises (tmp_path)
 test_validate_path_containment_allow_outside_passes (tmp_path)
 test_octrc_size_cap_skipped (tmp_path, capsys)
 test_small_octrc_with_root_marker_found (tmp_path)

Detailed Description

Purpose
-------
Validate path containment (OI-405) and ``.octrc.json`` size cap (OI-414)
logic in ``oct.core.project_root``.

Responsibilities
----------------
- Confirm ``validate_path_containment`` accepts paths within the project.
- Confirm it rejects paths outside unless ``allow_outside=True``.
- Confirm oversized ``.octrc.json`` files are skipped during root
  discovery and a warning is emitted.

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

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

Function Documentation

◆ test_octrc_size_cap_skipped()

tests_core.test_project_root.test_octrc_size_cap_skipped ( tmp_path,
capsys )
A ``.octrc.json`` larger than MAX_OCTRC_SIZE is skipped with a warning.

Definition at line 69 of file test_project_root.py.

Here is the call graph for this function:

◆ test_small_octrc_with_root_marker_found()

tests_core.test_project_root.test_small_octrc_with_root_marker_found ( tmp_path)
A small ``.octrc.json`` with root_marker=True wins over structural detection.

Definition at line 93 of file test_project_root.py.

Here is the call graph for this function:

◆ test_validate_path_containment_allow_outside_passes()

tests_core.test_project_root.test_validate_path_containment_allow_outside_passes ( tmp_path)

Definition at line 58 of file test_project_root.py.

Here is the call graph for this function:

◆ test_validate_path_containment_inside_passes()

tests_core.test_project_root.test_validate_path_containment_inside_passes ( tmp_path)

Definition at line 39 of file test_project_root.py.

Here is the call graph for this function:

◆ test_validate_path_containment_outside_raises()

tests_core.test_project_root.test_validate_path_containment_outside_raises ( tmp_path)

Definition at line 48 of file test_project_root.py.

Here is the call graph for this function: