|
1 | 1 | import pytest |
2 | 2 |
|
3 | | -from tests.lib.core.harness.conformance.runner import Fixture, derive_all, register, all_fixtures |
4 | 3 | from agentex.types.task_message_update import ( |
5 | | - StreamTaskMessageStart, StreamTaskMessageDone, StreamTaskMessageFull, |
| 4 | + StreamTaskMessageDone, |
| 5 | + StreamTaskMessageFull, |
| 6 | + StreamTaskMessageStart, |
6 | 7 | ) |
7 | 8 | from agentex.types.tool_request_content import ToolRequestContent |
8 | 9 | from agentex.types.tool_response_content import ToolResponseContent |
| 10 | +from tests.lib.core.harness.conformance.runner import Fixture, register, derive_all, all_fixtures |
9 | 11 |
|
10 | | -register(Fixture( |
11 | | - name="builtin-single-tool", |
12 | | - events=[ |
13 | | - StreamTaskMessageStart(type="start", index=0, |
14 | | - content=ToolRequestContent(type="tool_request", author="agent", |
15 | | - tool_call_id="c", name="Bash", arguments={})), |
16 | | - StreamTaskMessageDone(type="done", index=0), |
17 | | - StreamTaskMessageFull(type="full", index=1, |
18 | | - content=ToolResponseContent(type="tool_response", author="agent", |
19 | | - tool_call_id="c", name="Bash", content="ok")), |
20 | | - ], |
21 | | -)) |
| 12 | +register( |
| 13 | + Fixture( |
| 14 | + name="builtin-single-tool", |
| 15 | + events=[ |
| 16 | + StreamTaskMessageStart( |
| 17 | + type="start", |
| 18 | + index=0, |
| 19 | + content=ToolRequestContent( |
| 20 | + type="tool_request", author="agent", tool_call_id="c", name="Bash", arguments={} |
| 21 | + ), |
| 22 | + ), |
| 23 | + StreamTaskMessageDone(type="done", index=0), |
| 24 | + StreamTaskMessageFull( |
| 25 | + type="full", |
| 26 | + index=1, |
| 27 | + content=ToolResponseContent( |
| 28 | + type="tool_response", author="agent", tool_call_id="c", name="Bash", content="ok" |
| 29 | + ), |
| 30 | + ), |
| 31 | + ], |
| 32 | + ) |
| 33 | +) |
22 | 34 |
|
23 | 35 |
|
24 | 36 | @pytest.mark.parametrize("fixture", all_fixtures(), ids=lambda f: f.name) |
|
0 commit comments