From 194626e5ab0820a78ba454b950111cbfe91834a8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 2 Mar 2026 23:26:19 -0500 Subject: [PATCH] test(core): Replace pytest.fail with functional assertions in api_events and execution_engine --- tests/test_api_events.py | 3 --- tests/test_execution_engine.py | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_api_events.py b/tests/test_api_events.py index 7a6cae0..ce97c46 100644 --- a/tests/test_api_events.py +++ b/tests/test_api_events.py @@ -35,9 +35,6 @@ def test_event_emission() -> None: ai_client.events.emit("test_event", payload={"data": 123}) callback.assert_called_once_with(payload={"data": 123}) -def test_send_emits_events() -> None: - pytest.fail("TODO: This test is mocked incorrectly and asserts nothing. Use _proper version below.") - def test_send_emits_events_proper() -> None: with patch("ai_client._ensure_gemini_client"), \ patch("ai_client._gemini_client") as mock_client: diff --git a/tests/test_execution_engine.py b/tests/test_execution_engine.py index 352c463..2081ea8 100644 --- a/tests/test_execution_engine.py +++ b/tests/test_execution_engine.py @@ -39,11 +39,12 @@ def test_execution_engine_basic_flow() -> None: assert len(ready) == 0 def test_execution_engine_update_nonexistent_task() -> None: - dag = TrackDAG([]) + t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker") + dag = TrackDAG([t1]) engine = ExecutionEngine(dag) # Should not raise error, or handle gracefully engine.update_task_status("NONEXISTENT", "completed") - pytest.fail("TODO: Implement assertions") + assert t1.status == "todo" def test_execution_engine_status_persistence() -> None: t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker")