We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1da0ef7 commit 1aaf1c9Copy full SHA for 1aaf1c9
tests/test_agent.py
@@ -1,3 +1,5 @@
1
+from unittest.mock import MagicMock
2
+
3
from llm_agents_from_scratch.base.llm import BaseLLM
4
from llm_agents_from_scratch.core import LLMAgent
5
@@ -9,3 +11,17 @@ def test_init(mock_llm: BaseLLM) -> None:
9
11
10
12
assert len(agent.tools) == 0
13
assert agent.llm == mock_llm
14
15
16
+def test_add_tool(mock_llm: BaseLLM) -> None:
17
+ """tests add tool"""
18
19
+ # arrange
20
+ tool = MagicMock()
21
+ agent = LLMAgent(llm=mock_llm)
22
23
+ # act
24
+ agent.add_tool(tool)
25
26
+ # assert
27
+ assert agent.tools == [tool]
0 commit comments