test: strengthen regression oracles and cleanup ownership (#8152)

* test: strengthen suite oracles and cleanup ownership

* test: reuse setup across independent scenarios (#8153)

* Potential fix for pull request finding 'CodeQL / Improper code sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
morlutoandCopilot Autofix powered by AI authored and GitHub committed 2026-10-31 00:22:16 +08:00
1 parent 1ddee1089b
commit 675d4076de
98 files changed
+1373 -1034

No files matched your search

+5 -5
View File
@@ -10,7 +10,7 @@ import {
pythonPycHeader,
} from "../../src/python/PythonPyc.fixture.js";
import { createTestTempDirectory } from "../fixtures/temporaryDirectory.js";
import { cliTest } from "../support/cli/cliFixture.js";
import { cliTest, runFileCli } from "../support/cli/cliFixture.js";
const completePycEvidenceSchema = toolContract(
"inspect_python_pyc",
@@ -57,7 +57,7 @@ cliTest(
}),
]),
);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(result.exitCode, result.stderr).toBe(0);
@@ -77,7 +77,7 @@ cliTest(
}),
]),
);
const ordinaryInt = await cli.run({
const ordinaryInt = await runFileCli(cli, {
arguments: ["inspect-python-pyc", ordinaryIntPath, "--json"],
});
expect(ordinaryInt.exitCode, ordinaryInt.stderr).toBe(0);
@@ -95,7 +95,7 @@ cliTest(
Buffer.alloc(7),
]),
);
const truncated = await cli.run({
const truncated = await runFileCli(cli, {
arguments: ["inspect-python-pyc", truncatedPath, "--json"],
});
expect(truncated.exitCode).toBe(1);
@@ -183,7 +183,7 @@ cliTest(
const path = join(root, `inline-caches-${magic}.pyc`);
await writeFile(path, pyc);
const result = await cli.run({
const result = await runFileCli(cli, {
arguments: ["inspect-python-pyc", path, "--json"],
});
expect(