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

Classes

class  TestIgnoreAddPattern
class  TestIgnoreRemovePattern
class  TestIgnoreList
class  TestIgnoreValidation
class  TestIgnoreFencedBlockShared
class  TestIgnoreJson
class  TestIgnoreAudit

Functions

bool _git_available ()
subprocess.CompletedProcess _run_ignore (Path root, *str extra_args)

Detailed Description

Purpose
-------
Integration tests for ``oct git ignore`` (Phase 4G).

Responsibilities
----------------
- Verify pattern addition into the OCT-managed block.
- Verify pattern removal from the OCT-managed block.
- Verify ``--list`` partitions OCT-managed and user patterns.
- Verify pattern validation rejects unsafe inputs.
- Verify the same fenced block is shared with ``oct git init``.
- Verify JSON output schema.
- Verify audit trail.

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.

Function Documentation

◆ _git_available()

bool tests_git.test_git_ignore._git_available ( )
protected

Definition at line 43 of file test_git_ignore.py.

◆ _run_ignore()

subprocess.CompletedProcess tests_git.test_git_ignore._run_ignore ( Path root,
*str extra_args )
protected
Run ``oct git ignore`` in a subprocess.

Definition at line 47 of file test_git_ignore.py.

Here is the caller graph for this function: