|
Option C Tools
|
Classes | |
| class | TestHooksInstall |
| class | TestHooksStatus |
| class | TestHooksRemove |
| class | TestDeprecationShim |
| class | TestAuditTrail |
Functions | |
| bool | _git_available () |
| _git (Path repo, *str args, bool check=True) | |
| subprocess.CompletedProcess | _run_hooks (Path root, *str extra_args) |
| subprocess.CompletedProcess | _run_install_hooks (Path root, *str extra_args) |
| Path | _make_option_c_git_project (Path tmp_path, str name="hookproj") |
Purpose
-------
Integration tests for ``oct git hooks`` subgroup (Phase 4D — G-D8..G-D11).
Responsibilities
----------------
- Verify ``oct git hooks install`` creates .pre-commit-config.yaml.
- Verify ``oct git hooks status`` reports correct hook states.
- Verify ``oct git hooks remove`` removes OCT hooks.
- Verify deprecation shim for ``oct install-hooks``.
Diagnostics
-----------
Domain: GIT-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- All tests use subprocess invocation and tmp_path fixtures.
|
protected |
|
protected |
Definition at line 44 of file test_git_hooks.py.
|
protected |
Create a git repo with Option C project structure.
Definition at line 78 of file test_git_hooks.py.
|
protected |
Run ``oct git hooks <subcmd>`` in a subprocess.
Definition at line 58 of file test_git_hooks.py.
|
protected |
Run the deprecated ``oct install-hooks``.
Definition at line 68 of file test_git_hooks.py.