kin: auto-commit after pipeline
This commit is contained in:
parent
6eea439c16
commit
7027252a84
3 changed files with 12 additions and 18 deletions
|
|
@ -518,10 +518,11 @@ class TestContextBuilderDuplicateAssignment:
|
|||
assert "PROJ-001" in result
|
||||
assert "My test task" in result
|
||||
|
||||
def test_source_code_has_duplicate_task_assignment(self):
|
||||
"""Documents that the duplicate assignment still exists in the source.
|
||||
def test_source_code_has_single_task_assignment(self):
|
||||
"""Duplicate assignment was removed from context_builder.py.
|
||||
|
||||
This test will FAIL once the duplicate is removed (cleanup completed).
|
||||
Issue 4 fixed: task = context.get('task') now appears exactly once
|
||||
inside format_prompt().
|
||||
"""
|
||||
import ast
|
||||
import pathlib
|
||||
|
|
@ -533,14 +534,12 @@ class TestContextBuilderDuplicateAssignment:
|
|||
task_assign_count = 0
|
||||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.Assign):
|
||||
# Check target is 'task'
|
||||
targets_are_task = any(
|
||||
isinstance(t, ast.Name) and t.id == "task"
|
||||
for t in node.targets
|
||||
)
|
||||
if not targets_are_task:
|
||||
continue
|
||||
# Check value is context.get('task') or context.get("task")
|
||||
val = node.value
|
||||
if (
|
||||
isinstance(val, ast.Call)
|
||||
|
|
@ -554,8 +553,7 @@ class TestContextBuilderDuplicateAssignment:
|
|||
):
|
||||
task_assign_count += 1
|
||||
|
||||
assert task_assign_count == 2, (
|
||||
f"Expected exactly 2 duplicate 'task = context.get(\"task\")' assignments "
|
||||
f"(documenting Issue 4), found {task_assign_count}. "
|
||||
"If count is 1, the duplicate was removed — this test can be deleted."
|
||||
assert task_assign_count == 1, (
|
||||
f"Expected exactly 1 'task = context.get(\"task\")' assignment, "
|
||||
f"found {task_assign_count}. Duplicate may have been re-introduced."
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue