Test creating message with typed tool calls.
(self)
| 217 | assert typed == [] |
| 218 | |
| 219 | def test_with_tool_calls(self): |
| 220 | """Test creating message with typed tool calls.""" |
| 221 | fc = FunctionCallData(name="sqrt", arguments='{"x": 18}') |
| 222 | tc = ToolCallData(id="call_1", function=fc) |
| 223 | |
| 224 | msg = Message.with_tool_calls( |
| 225 | role=MessageRole.ASSISTANT, tool_calls=[tc], content="Calling sqrt" |
| 226 | ) |
| 227 | assert msg.role == MessageRole.ASSISTANT |
| 228 | assert msg.content == "Calling sqrt" |
| 229 | assert len(msg.tool_calls) == 1 |
| 230 | |
| 231 | |
| 232 | class TestToolExecutionRecord: |
nothing calls this directly
no test coverage detected