Option C Tools
Loading...
Searching...
No Matches
tests_formatter.test_format_changed Namespace Reference

Classes

class  TestFormatChanged

Functions

bool _git_available ()
 _git (Path repo, *str args, bool check=True)
Path _make_format_project (Path tmp_path)

Detailed Description

Purpose
-------
Tests for ``oct format --changed`` (Phase 4C — G-C2).

Responsibilities
----------------
- Verify that ``--changed`` formats only git-modified Python files.
- Verify graceful behaviour in non-git directories.
- Verify JSON output mode with ``--changed``.

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

Contracts
---------
- All tests use tmp_path so they are automatically cleaned up.

Function Documentation

◆ _git()

tests_formatter.test_format_changed._git ( Path repo,
*str args,
bool check = True )
protected

Definition at line 47 of file test_format_changed.py.

Here is the caller graph for this function:

◆ _git_available()

bool tests_formatter.test_format_changed._git_available ( )
protected

Definition at line 43 of file test_format_changed.py.

◆ _make_format_project()

Path tests_formatter.test_format_changed._make_format_project ( Path tmp_path)
protected
Create a git repo with pyproject.toml and one committed Python file.

Definition at line 57 of file test_format_changed.py.

Here is the call graph for this function:
Here is the caller graph for this function: