test(coding-agent): minor fixes

This commit is contained in:
can1357
2026-05-17 03:12:36 +02:00
parent cb05764eac
commit 5523582735
3 changed files with 24 additions and 31 deletions
@@ -369,7 +369,7 @@ describe("AgentSession python cleanup", () => {
expect(EvalTool).toBeDefined();
let toolExecutionSettled = false;
const toolExecution = EvalTool!
.execute("call-id", { input: "```py\nprint('tool')\n```" }, undefined, undefined, undefined)
.execute("call-id", { cells: [{ language: "py", code: "print('tool')" }] }, undefined, undefined, undefined)
.finally(() => {
toolExecutionSettled = true;
});
@@ -594,7 +594,13 @@ describe("AgentSession python cleanup", () => {
expect(EvalTool).toBeDefined();
const disposeSession = session.dispose();
await expect(
EvalTool!.execute("call-id", { input: "```py\nprint('late')\n```" }, undefined, undefined, undefined),
EvalTool!.execute(
"call-id",
{ cells: [{ language: "py", code: "print('late')" }] },
undefined,
undefined,
undefined,
),
).rejects.toThrow("Python execution is unavailable while session disposal is in progress");
await disposeSession;
expect(executeSpy).not.toHaveBeenCalled();
@@ -629,7 +635,7 @@ describe("AgentSession python cleanup", () => {
expect(EvalTool).toBeDefined();
const execution = EvalTool!.execute(
"call-id",
{ input: "```py\nprint('late after artifact')\n```" },
{ cells: [{ language: "py", code: "print('late after artifact')" }] },
undefined,
undefined,
undefined,