Option C Tools
Loading...
Searching...
No Matches
tests_scaffold.test_octrc_template Namespace Reference

Functions

 test_octrc_template_has_linter_profile (Path tmp_path)
 test_octrc_template_has_git_example (Path tmp_path)
 test_octrc_template_round_trips_through_safe_loader (Path tmp_path)

Detailed Description

Purpose
-------
OI-530 regression coverage — the scaffolded ``.octrc.json`` must ship
with a live ``linter.profile`` default plus a discoverable (but inert)
``_git_example`` stanza so new projects inherit sensible defaults and
can copy-paste branch protection into place without reading docs.

Responsibilities
----------------
- ``linter.profile == "compact"`` after scaffold.
- ``_git_example`` is present and documents ``protected_branches`` +
  ``branch_profile_map``.
- :func:`oct.core.octrc.load_octrc_safe` round-trips the template without
  dropping the underscore-prefixed example key.

Diagnostics
-----------
Domain: SCAFFOLD-TESTS
Levels:
    L2 — test lifecycle
    L3 — assertion details
    L4 — deep tracing

Contracts
---------
- All scaffold operations write to ``tmp_path``; no real project
  directories are created.

Function Documentation

◆ test_octrc_template_has_git_example()

tests_scaffold.test_octrc_template.test_octrc_template_has_git_example ( Path tmp_path)

Definition at line 52 of file test_octrc_template.py.

◆ test_octrc_template_has_linter_profile()

tests_scaffold.test_octrc_template.test_octrc_template_has_linter_profile ( Path tmp_path)

Definition at line 44 of file test_octrc_template.py.

◆ test_octrc_template_round_trips_through_safe_loader()

tests_scaffold.test_octrc_template.test_octrc_template_round_trips_through_safe_loader ( Path tmp_path)

Definition at line 63 of file test_octrc_template.py.