[claude] Fix syntax errors in test_llm_triage.py (#1329) (#1332)
Some checks failed
Tests / lint (push) Has been cancelled
Tests / test (push) Has been cancelled

This commit was merged in pull request #1332.
This commit is contained in:
2026-03-24 02:28:45 +00:00
parent 0fefb1c297
commit 4f8df32882

View File

@@ -56,16 +56,17 @@ def test_run_triage(mock_gitea_client, mock_llm_client, mock_files):
}
}
with patch("scripts.llm_triage.PROMPT_PATH", mock_files / "scripts/deep_triage_prompt.md"),
patch("scripts.llm_triage.QUEUE_PATH", mock_files / ".loop/queue.json"),
patch("scripts.llm_triage.SUMMARY_PATH", mock_files / ".loop/retro/summary.json"),
patch("scripts.llm_triage.RETRO_PATH", mock_files / ".loop/retro/deep-triage.jsonl"):
with (
patch("scripts.llm_triage.PROMPT_PATH", mock_files / "scripts/deep_triage_prompt.md"),
patch("scripts.llm_triage.QUEUE_PATH", mock_files / ".loop/queue.json"),
patch("scripts.llm_triage.SUMMARY_PATH", mock_files / ".loop/retro/summary.json"),
patch("scripts.llm_triage.RETRO_PATH", mock_files / ".loop/retro/deep-triage.jsonl"),
):
run_triage()
# Check that the queue and retro files were written
assert (mock_files / ".loop/queue.json").read_text() == '[{"issue": 1}]'
assert (mock_files / ".loop/retro/deep-triage.jsonl").read_text() == '{"issues_closed": [2], "issues_created": [{"title": "New Issue", "body": "This is a new issue."}]}
'
assert (mock_files / ".loop/retro/deep-triage.jsonl").read_text() == '{"issues_closed": [2], "issues_created": [{"title": "New Issue", "body": "This is a new issue."}]}\n'
# Check that the Gitea client was called correctly
mock_gitea_client.return_value.close_issue.assert_called_once_with(2)