|
Option C Tools
|
Functions | |
| McpConfig | _make_config () |
| test_canonical_path_preferred (Path tmp_path) | |
| test_legacy_path_used_when_canonical_absent (Path tmp_path) | |
| test_neither_path_returns_empty (Path tmp_path) | |
Variables | |
| list | _CANONICAL_PATTERNS = [{"name": "canonical", "pattern": "CANONICAL-SECRET"}] |
| list | _LEGACY_PATTERNS = [{"name": "legacy", "pattern": "LEGACY-SECRET"}] |
Purpose
-------
OI-504 regression tests — ``_load_debug_config_patterns()`` must look up
``debug_config.json`` at ``<root>/oc_diagnostics/debug_config.json`` first
(the canonical location since v0.9.0) and fall back to the legacy
``<root>/debug_config.json`` only when the canonical path is absent.
Responsibilities
----------------
- Canonical ``oc_diagnostics/debug_config.json`` is preferred when present.
- Legacy root-level ``debug_config.json`` is still read when the canonical
path is missing.
- Neither path present → returns ``[]`` (safe default, no raise).
Diagnostics
-----------
Domain: MCP-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Function never raises; returns a list.
|
protected |
Definition at line 44 of file test_mcp_debug_config_path.py.
| tests_mcp.test_mcp_debug_config_path.test_canonical_path_preferred | ( | Path | tmp_path | ) |
Definition at line 48 of file test_mcp_debug_config_path.py.
| tests_mcp.test_mcp_debug_config_path.test_legacy_path_used_when_canonical_absent | ( | Path | tmp_path | ) |
Definition at line 65 of file test_mcp_debug_config_path.py.
| tests_mcp.test_mcp_debug_config_path.test_neither_path_returns_empty | ( | Path | tmp_path | ) |
Definition at line 76 of file test_mcp_debug_config_path.py.
|
protected |
Definition at line 40 of file test_mcp_debug_config_path.py.
|
protected |
Definition at line 41 of file test_mcp_debug_config_path.py.