mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
test: Add negative test cases for tool output formatting
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -324,6 +324,9 @@ def test_sync_task_execution():
|
|||||||
("test result``````", "test result"),
|
("test result``````", "test result"),
|
||||||
("test result", "test result"),
|
("test result", "test result"),
|
||||||
("test ```result```", "test ```result"), # Only strip trailing backticks
|
("test ```result```", "test ```result"), # Only strip trailing backticks
|
||||||
|
(None, None), # Test non-string input
|
||||||
|
("", ""), # Test empty string
|
||||||
|
("malformed`result```test", "malformed`result```test"), # Test non-trailing backticks
|
||||||
])
|
])
|
||||||
def test_hierarchical_tool_output_formatting(tool_output, expected):
|
def test_hierarchical_tool_output_formatting(tool_output, expected):
|
||||||
"""Test that tool outputs in hierarchical mode don't have extra backticks.
|
"""Test that tool outputs in hierarchical mode don't have extra backticks.
|
||||||
|
|||||||
Reference in New Issue
Block a user