From dfb4fa1b26f2a13fd5413d59b60f859784583ca8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 28 Feb 2026 20:18:54 -0500 Subject: [PATCH] test(stabilization): Fix ai_style_formatter test expectations and integrate vlogger --- conductor/tracks/python_style_refactor_20260227/plan.md | 3 ++- tests/test_ai_style_formatter.py | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/conductor/tracks/python_style_refactor_20260227/plan.md b/conductor/tracks/python_style_refactor_20260227/plan.md index 445d0a1..8d7c93e 100644 --- a/conductor/tracks/python_style_refactor_20260227/plan.md +++ b/conductor/tracks/python_style_refactor_20260227/plan.md @@ -43,7 +43,7 @@ ## Phase 6: Test Suite Stabilization (High-Signal Reporting) - [x] Task: Conductor - Resolve API/Method name drift (e.g., `run_linear` -> `run` in ConductorEngine). - **Requirement:** Implement "Before vs After" state tables in `logs/test/unique_signature/.txt`. -- [ ] Task: Conductor - Fix `ai_style_formatter.py` test expectations for ultra-compact style. +- [x] Task: Conductor - Fix `ai_style_formatter.py` test expectations for ultra-compact style. - **Requirement:** Log table-based comparison of code states in `logs/test/unique_signature/test_ai_style_formatter.txt`. - [ ] Task: Conductor - Align `tier4_interceptor.py` tests with current PowerShell output formatting. - **Requirement:** Log expected vs actual PowerShell output mappings in `logs/test/unique_signature/test_tier4_interceptor.txt`. @@ -51,3 +51,4 @@ - **Requirement:** Log comprehensive environment telemetry (Before/After/Delta) in `logs/test/unique_signature/live_gui_diag.txt`. - [ ] Task: Conductor - User Manual Verification 'Phase 6: Test Suite Stabilization' + diff --git a/tests/test_ai_style_formatter.py b/tests/test_ai_style_formatter.py index 202569b..c52b543 100644 --- a/tests/test_ai_style_formatter.py +++ b/tests/test_ai_style_formatter.py @@ -95,7 +95,7 @@ def test_continuation_indentation() -> None: ) assert format_code(source) == expected -def test_multiple_top_level_definitions() -> None: +def test_multiple_top_level_definitions(vlogger) -> None: source = textwrap.dedent("""\ class MyClass: def __init__(self): @@ -112,10 +112,14 @@ def test_multiple_top_level_definitions() -> None: "class MyClass:\n" " def __init__(self):\n" " self.x = 1\n" + "\n" " def method(self):\n" " pass\n" "\n" "def top_level():\n" " pass\n" ) - assert format_code(source) == expected + result = format_code(source) + vlogger.log_state("Formatted Output", repr(source), repr(result)) + assert result == expected + vlogger.finalize("AI Style Formatter", "PASS", "Code states correctly match the 1-space ultra-compact style expectations.")