Option C Tools
Loading...
Searching...
No Matches
tests_git.test_git_status Namespace Reference

Classes

class  TestCleanRepo
class  TestBadges
class  TestNoCheck
class  TestJsonOutput
class  TestEdgeCases

Functions

subprocess.CompletedProcess _run_status (Path root, *str extra_args)

Detailed Description

Purpose
-------
Integration tests for ``oct git status`` (Phase 4B / G-B2).
Validates terminal output, ``--json`` schema, ``--no-check`` mode,
and edge cases (detached HEAD, no remote, clean repo).

Responsibilities
----------------
- Verify ``[OK]`` / ``[!!]`` / ``---`` badge rendering for staged,
  modified, and untracked files.
- Verify ``--json`` output is valid JSON with the expected schema.
- Verify ``--no-check`` suppresses compliance annotations.
- Verify clean repo produces empty sections.
- Verify detached HEAD and no-remote edge cases.

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

Contracts
---------
- Every test uses the ``temp_git_project`` fixture (real git repo).
- Tests never modify the system git config.

Function Documentation

◆ _run_status()

subprocess.CompletedProcess tests_git.test_git_status._run_status ( Path root,
*str extra_args )
protected
Run ``oct git status`` in a subprocess and return the result.

Definition at line 49 of file test_git_status.py.

Here is the caller graph for this function: