Skip to content

Commit ed199fb

Browse files
committed
refactor tests; remove unused result variable from agent run calls in test_agent and test_web_agent
1 parent 29699dd commit ed199fb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_tool_not_found_produces_error_in_tool_message():
6262
mock_llm = make_mock_llm(step1, step2)
6363
agent = Agent(llm=mock_llm, tools=[], max_steps=10)
6464

65-
result = agent.run(Content(text="task"))
65+
agent.run(Content(text="task"))
6666
# Find tool message in history
6767
tool_msgs = [m for m in agent._messages if isinstance(m, ToolMessage)]
6868
assert len(tool_msgs) == 1
@@ -118,7 +118,7 @@ def spy_summarize(tool_name, arguments, output):
118118

119119
monkeypatch.setattr(agent, "_summarize_output", spy_summarize)
120120

121-
result = agent.run(Content(text="task"))
121+
agent.run(Content(text="task"))
122122
assert len(summarize_called) == 1
123123
assert summarize_called[0][0] == "big"
124124

tests/test_web_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_unknown_tool_name_produces_error_content():
9696

9797
agent = make_web_agent([step1, step2])
9898

99-
result = agent.run(Content(text="task"))
99+
agent.run(Content(text="task"))
100100
tool_msgs = [m for m in agent._messages if isinstance(m, ToolMessage)]
101101
assert len(tool_msgs) == 1
102102
assert "unknown tool" in tool_msgs[0].tool_result.content.text

0 commit comments

Comments
 (0)