|
Option C Tools
|
Classes | |
| class | TestAddSingleFile |
| class | TestAddMultipleFiles |
| class | TestAddUpdate |
| class | TestAddAll |
| class | TestAddDryRun |
| class | TestAddOutsideProjectScope |
| class | TestAddJson |
| class | TestAddMutualExclusivity |
| class | TestAddNoOp |
| class | TestAddIgnoredDirWarning |
| class | TestAddAudit |
Functions | |
| bool | _git_available () |
| subprocess.CompletedProcess | _run_add (Path root, *str extra_args) |
| list[str] | _staged_names (Path repo) |
Purpose
-------
Integration tests for ``oct git add`` (Phase 4G).
Responsibilities
----------------
- Verify whole-file staging stages the requested paths.
- Verify ``--update`` and ``--all`` behave like ``git add -u`` / ``-A``.
- Verify ``--dry-run`` does not modify the index.
- Verify ``--patch`` constructs the correct argv (passthrough is mocked).
- Verify mutual exclusivity rules.
- Verify JSON output schema.
- Verify the post-stage quality gate advisory.
Diagnostics
-----------
Domain: GIT-TESTS
Levels:
L2 -- test lifecycle
L3 -- assertion details
L4 -- deep tracing
Contracts
---------
- All tests use subprocess invocation against ``oct.cli``.
- All tests use tmp_path fixtures so they are automatically cleaned up.
|
protected |
Definition at line 45 of file test_git_add.py.
|
protected |
Run ``oct git add`` in a subprocess.
Definition at line 49 of file test_git_add.py.
|
protected |
Return file names currently staged (index).
Definition at line 59 of file test_git_add.py.