Skip to content

Commit

Permalink
Update test_events to validate multiple tool usage events
Browse files Browse the repository at this point in the history
- Modify test to assert 75 events instead of a single error event
- Remove pytest.raises() check, allowing crew kickoff to complete
- Adjust event validation to support broader event tracking
  • Loading branch information
lorenzejay committed Feb 15, 2025
1 parent 6d1bcff commit 1603a1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/utilities/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,9 @@ def _run(self) -> str:
)

crew = Crew(agents=[agent], tasks=[task], name="TestCrew")
with pytest.raises(Exception):
crew.kickoff()
crew.kickoff()

assert len(received_events) == 1
assert len(received_events) == 75
assert received_events[0].agent_key == agent.key
assert received_events[0].agent_role == agent.role
assert received_events[0].tool_name == "error_tool"
Expand Down

0 comments on commit 1603a1d

Please sign in to comment.