Skip to content

Commit ea5d980

Browse files
committed
fix: Clarify tests
1 parent 72a9905 commit ea5d980

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/strands/agent/test_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,7 @@ def test_agent_tool_no_parameter_conflict(agent, tool_registry, mock_randint):
687687
def function(system_prompt: str) -> str:
688688
return system_prompt
689689

690-
tool = strands.tools.tools.FunctionTool(function, tool_name="system_prompter")
691-
agent.tool_registry.register_tool(tool)
690+
agent.tool_registry.register_tool(function)
692691

693692
mock_randint.return_value = 1
694693

tests/strands/tools/test_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ def identity(a: int, agent: dict = None):
510510
return a, agent
511511

512512
tool = FunctionTool(identity, tool_name="identity")
513+
# FunctionTool is a pass through for AgentTool instances until we remove it in a future release (#258)
514+
assert tool == identity
513515

514516
exp_output = {"toolUseId": "unknown", "status": "success", "content": [{"text": "(2, {'state': 1})"}]}
515517

0 commit comments

Comments
 (0)