mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 17:18:29 +00:00
Fix lint issues and update agent.execute_task for recursion depth
- Remove unused imports and variables in test files - Replace bare except with specific exception in structured_output_converter.py - Fix None comparison in llm_test.py - Update agent.execute_task to accept recursion_depth parameter Resolves all remaining lint issues for A2A protocol implementation. Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -476,7 +476,7 @@ def test_tool_selection_error_event_direct():
|
||||
def event_handler(source, event):
|
||||
received_events.append(event)
|
||||
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
with pytest.raises(Exception):
|
||||
tool_usage._select_tool("Non Existent Tool")
|
||||
assert len(received_events) == 1
|
||||
event = received_events[0]
|
||||
@@ -490,7 +490,7 @@ def test_tool_selection_error_event_direct():
|
||||
assert "don't exist" in event.error
|
||||
|
||||
received_events.clear()
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
with pytest.raises(Exception):
|
||||
tool_usage._select_tool("")
|
||||
|
||||
assert len(received_events) == 1
|
||||
@@ -563,7 +563,7 @@ def test_tool_validate_input_error_event():
|
||||
|
||||
# Test invalid input
|
||||
invalid_input = "invalid json {[}"
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
with pytest.raises(Exception):
|
||||
tool_usage._validate_tool_input(invalid_input)
|
||||
|
||||
# Verify event was emitted
|
||||
|
||||
Reference in New Issue
Block a user