Refactor agent_utils.py by removing unused event imports and adding missing commas in function definitions. Update test_events.py to reflect changes in expected event counts and adjust assertions accordingly. Modify test_tools_emits_error_events.yaml to include new headers and update response content for consistency with recent API changes.

This commit is contained in:
Lorenze Jay
2025-03-31 15:21:44 -07:00
parent b8d871e795
commit 288afba5fa
3 changed files with 10850 additions and 5783 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -385,6 +385,7 @@ def test_tools_emits_error_events():
goal="Try to use the error tool",
backstory="You are an assistant that tests error handling",
tools=[ErrorTool()],
llm=LLM(model="gpt-4o-mini"),
)
task = Task(
@@ -396,7 +397,7 @@ def test_tools_emits_error_events():
crew = Crew(agents=[agent], tasks=[task], name="TestCrew")
crew.kickoff()
assert len(received_events) == 75
assert len(received_events) == 48
assert received_events[0].agent_key == agent.key
assert received_events[0].agent_role == agent.role
assert received_events[0].tool_name == "error_tool"