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

Classes

class  TestScopeProject
class  TestScopeRepo
class  TestScopeAuto

Functions

bool _git_available ()
subprocess.CompletedProcess _git (Path repo, *str args, bool check=True)
subprocess.CompletedProcess _run_status (Path project_dir, *str extra_args)
tuple[Path, Path] monorepo_with_outside (Path tmp_path)

Detailed Description

Purpose
-------
Integration tests for the ``--scope`` flag on ``oct git status``
(Phase 4G). Validates the project / repo / auto modes that control
whether files outside the OCT project root are surfaced.

Responsibilities
----------------
- ``project`` (default) — only files inside the OCT project root.
- ``repo`` — every file the git index/work-tree knows about.
- ``auto`` — collapses to project when project_root == repo_root,
  otherwise behaves like repo.

Diagnostics
-----------
Domain: GIT-TESTS
Levels:
    L2 -- test lifecycle
    L3 -- assertion details

Contracts
---------
- All tests use subprocess invocation against ``oct.cli``.
- All tests use tmp_path fixtures so they are automatically cleaned up.

Function Documentation

◆ _git()

subprocess.CompletedProcess tests_git.test_status_scope._git ( Path repo,
*str args,
bool check = True )
protected

Definition at line 46 of file test_status_scope.py.

Here is the caller graph for this function:

◆ _git_available()

bool tests_git.test_status_scope._git_available ( )
protected

Definition at line 42 of file test_status_scope.py.

Here is the caller graph for this function:

◆ _run_status()

subprocess.CompletedProcess tests_git.test_status_scope._run_status ( Path project_dir,
*str extra_args )
protected

Definition at line 55 of file test_status_scope.py.

Here is the caller graph for this function:

◆ monorepo_with_outside()

tuple[Path, Path] tests_git.test_status_scope.monorepo_with_outside ( Path tmp_path)
Create a monorepo and place a file outside the OCT project.

Definition at line 72 of file test_status_scope.py.

Here is the call graph for this function: