MCPcopy
hub / github.com/huggingface/smolagents / test_code_agent_metrics

Function test_code_agent_metrics

tests/test_monitoring.py:177–186  ·  view source on GitHub ↗
(agent_class)

Source from the content-addressed store, hash-verified

175
176@pytest.mark.parametrize("agent_class", [CodeAgent, ToolCallingAgent])
177def test_code_agent_metrics(agent_class):
178 agent = agent_class(
179 tools=[],
180 model=FakeLLMModel(),
181 max_steps=1,
182 )
183 agent.run("Fake task")
184
185 assert agent.monitor.total_input_token_count == 10
186 assert agent.monitor.total_output_token_count == 20
187
188
189class ReplayTester(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

runMethod · 0.80
FakeLLMModelClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…