|
Option C Tools
|
Functions | |
| None | _write_octrc (Path root, str content) |
| test_schema_error_non_strict_warns_but_does_not_exit (Path temp_project_root, pytest.MonkeyPatch monkeypatch, pytest.CaptureFixture capsys) | |
| test_schema_error_strict_mode_exits_2 (Path temp_project_root, pytest.MonkeyPatch monkeypatch, pytest.CaptureFixture capsys) | |
| test_malformed_json_strict_mode_exits_2 (Path temp_project_root, pytest.MonkeyPatch monkeypatch, pytest.CaptureFixture capsys) | |
Purpose
-------
OI-501 regression tests — ``.octrc.json`` schema errors must *warn* (not crash)
in non-strict mode, and *raise* ``SystemExit(2)`` only when strict-config is
enabled. Prior to the fix, ``raise SystemExit(2)`` was indented at the wrong
level, so every schema error crashed the linter unconditionally.
Responsibilities
----------------
- Non-strict mode + schema error → warning printed to stderr, no SystemExit(2).
- Strict mode + schema error → SystemExit(2).
- Strict mode + malformed JSON → SystemExit(2) (unchanged behaviour).
Diagnostics
-----------
Domain: LINTER-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- ``.octrc.json`` handling must not raise in non-strict mode.
|
protected |
Definition at line 41 of file test_oct_lint_schema_warning.py.
| tests_linter.test_oct_lint_schema_warning.test_malformed_json_strict_mode_exits_2 | ( | Path | temp_project_root, |
| pytest.MonkeyPatch | monkeypatch, | ||
| pytest.CaptureFixture | capsys ) |
Definition at line 78 of file test_oct_lint_schema_warning.py.
| tests_linter.test_oct_lint_schema_warning.test_schema_error_non_strict_warns_but_does_not_exit | ( | Path | temp_project_root, |
| pytest.MonkeyPatch | monkeypatch, | ||
| pytest.CaptureFixture | capsys ) |
Definition at line 45 of file test_oct_lint_schema_warning.py.
| tests_linter.test_oct_lint_schema_warning.test_schema_error_strict_mode_exits_2 | ( | Path | temp_project_root, |
| pytest.MonkeyPatch | monkeypatch, | ||
| pytest.CaptureFixture | capsys ) |
Definition at line 63 of file test_oct_lint_schema_warning.py.