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

Classes

class  TestWorkspaceStatusFromRoot
class  TestWorkspaceFanOut
class  TestWorkspaceStatusFromSubproject

Functions

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

Detailed Description

Purpose
-------
Integration test for L1 / F1 leanest first cut: ``oct git status``
invoked from a workspace root (a directory containing
``.option_c_workspace.json``) succeeds without the
``--root-dir . --allow-outside-project`` escape hatch that pre-F1
users needed.

Responsibilities
----------------
- Verify that placing a workspace manifest at a parent directory
  makes ``oct git status`` work from that parent.
- Verify backwards compat: ``oct git status`` from inside a
  subproject still resolves to the subproject root (not the
  workspace root).

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

Function Documentation

◆ _git()

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

Definition at line 43 of file test_workspace_status.py.

Here is the caller graph for this function:

◆ _git_available()

bool tests_git.test_workspace_status._git_available ( )
protected

Definition at line 39 of file test_workspace_status.py.

Here is the caller graph for this function:

◆ _run_status()

subprocess.CompletedProcess tests_git.test_workspace_status._run_status ( Path cwd,
*str extra_args )
protected

Definition at line 50 of file test_workspace_status.py.

Here is the caller graph for this function:

◆ workspace_with_subproject()

tuple[Path, Path] tests_git.test_workspace_status.workspace_with_subproject ( Path tmp_path)
Create a workspace with one Option C subproject inside.

Layout::

    <ws_root>/
    ├── .option_c_workspace.json
    ├── .git/
    └── subproj/
        ├── .option_c/
        ├── .octrc.json
        ├── pyproject.toml
        ├── docs/ARCHITECTURE.md
        ├── oc_diagnostics/
        ├── tests/
        ├── logs/
        ├── debug_config.json
        └── src/

Definition at line 60 of file test_workspace_status.py.

Here is the call graph for this function:

◆ workspace_with_two_subprojects()

tests_git.test_workspace_status.workspace_with_two_subprojects ( Path tmp_path)
Two-subproject workspace fixture for F1.2 fan-out tests.

Definition at line 156 of file test_workspace_status.py.

Here is the call graph for this function: