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

Functions

 test_in_tree_path_is_rendered_project_relative (tmp_path)
 test_out_of_tree_path_falls_back_to_absolute_posix (tmp_path)
 test_backslashes_are_normalised_to_posix (tmp_path)

Detailed Description

Purpose
-------
OI-533 regression tests — :func:`oct.core.paths.to_project_relative`
renders filesystem paths as project-relative POSIX strings for
user-facing output (lint findings, health reports, git status, etc.)
so absolute machine paths never leak into CI logs or pasted errors.

Responsibilities
----------------
- In-tree paths are rendered relative to *project_root*.
- Out-of-tree paths fall back to the absolute POSIX form.
- Windows-style backslashes are normalised to forward slashes on
  every platform.

Diagnostics
-----------
Domain: CORE-TESTS
Levels:
    L2 — test lifecycle
    L3 — individual assertions
    L4 — deep tracing

Contracts
---------
- Tests use synthetic paths; no real filesystem reads or writes.

Function Documentation

◆ test_backslashes_are_normalised_to_posix()

tests_core.test_paths.test_backslashes_are_normalised_to_posix ( tmp_path)

Definition at line 62 of file test_paths.py.

◆ test_in_tree_path_is_rendered_project_relative()

tests_core.test_paths.test_in_tree_path_is_rendered_project_relative ( tmp_path)

Definition at line 40 of file test_paths.py.

◆ test_out_of_tree_path_falls_back_to_absolute_posix()

tests_core.test_paths.test_out_of_tree_path_falls_back_to_absolute_posix ( tmp_path)

Definition at line 49 of file test_paths.py.