Option C Tools
Loading...
Searching...
No Matches
tests_linter.test_lint_changed Namespace Reference

Classes

class  TestLintChanged

Functions

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

Detailed Description

Purpose
-------
Regression tests for ``oct lint --changed`` (Phase 4C — G-C4).

Responsibilities
----------------
- Verify the Phase 4A ``_git_changed_files`` shim still works.
- Verify that ``--changed`` lints only git-modified Python files.
- Verify graceful fallback in non-git directories.

Diagnostics
-----------
Domain: LINT-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_linter.test_lint_changed._git ( Path repo,
*str args,
bool check = True )
protected

Definition at line 47 of file test_lint_changed.py.

Here is the caller graph for this function:

◆ _git_available()

bool tests_linter.test_lint_changed._git_available ( )
protected

Definition at line 43 of file test_lint_changed.py.

◆ _make_lint_project()

Path tests_linter.test_lint_changed._make_lint_project ( Path tmp_path)
protected
Create a git repo with pyproject.toml and one committed Python file.

Definition at line 57 of file test_lint_changed.py.

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