From 064578f44b0ce622b45eefa716efd3b7097cc9c8 Mon Sep 17 00:00:00 2001 From: Joao Moura Date: Mon, 16 Feb 2026 00:09:13 -0800 Subject: [PATCH] Refactor test_flow_ask.py to streamline flow kickoff calls - Removed unnecessary variable assignments for the result of `flow.kickoff()` in two test cases, improving code clarity. - Updated assertions to ensure the expected execution log entries are present after the flow kickoff, enhancing test reliability. --- lib/crewai/tests/test_flow_ask.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/crewai/tests/test_flow_ask.py b/lib/crewai/tests/test_flow_ask.py index 6fd6a5787..d198e261c 100644 --- a/lib/crewai/tests/test_flow_ask.py +++ b/lib/crewai/tests/test_flow_ask.py @@ -10,9 +10,7 @@ from __future__ import annotations import time from datetime import datetime from typing import Any -from unittest.mock import MagicMock, call, patch - -from pydantic import BaseModel +from unittest.mock import MagicMock, patch from crewai.flow import Flow, flow_config, listen, start from crewai.flow.async_feedback.providers import ConsoleProvider @@ -628,7 +626,7 @@ class TestAskIntegration: return "processed" flow = TestFlow() - result = flow.kickoff() + flow.kickoff() assert "gathered:AI agents" in execution_log assert "processing" in execution_log @@ -731,7 +729,7 @@ class TestAskIntegration: flow = TestFlow() with patch.object(flow, "_request_human_feedback", return_value="looks good"): - result = flow.kickoff() + flow.kickoff() # Flow completed with both ask and human_feedback assert flow.last_human_feedback is not None