(self)
| 1405 | class TestOnToolStart: |
| 1406 | @pytest.mark.asyncio |
| 1407 | async def test_with_metadata(self): |
| 1408 | tm = DummyToolManager() |
| 1409 | ctx = DummyContext(tool_manager=tm) |
| 1410 | ui = DummyUIManager() |
| 1411 | tp = ToolProcessor(ctx, ui) |
| 1412 | |
| 1413 | tp._call_metadata["c1"] = ToolCallMetadata( |
| 1414 | llm_tool_name="my_tool", |
| 1415 | execution_tool_name="my_tool", |
| 1416 | display_name="my_tool", |
| 1417 | arguments={"key": "val"}, |
| 1418 | ) |
| 1419 | |
| 1420 | call = CTPToolCall(id="c1", tool="echo", arguments={"key": "val"}) |
| 1421 | await tp._on_tool_start(call) |
| 1422 | assert ("my_tool", {"key": "val"}) in ui._start_calls |
| 1423 | |
| 1424 | @pytest.mark.asyncio |
| 1425 | async def test_without_metadata(self): |
nothing calls this directly
no test coverage detected