test(ci): verify complete Python reports and exact model references

This commit is contained in:
Agent Workbench Dev
2026-11-07 23:25:49 +08:00
parent 50d799c6b4
commit d5207dc6cc
4 changed files with 25 additions and 3 deletions
+3 -1
View File
@@ -190,7 +190,9 @@ test('real pytest pass, failure, skip, collection errors and teardown errors use
test('a real project virtual environment is detected statically and its actual version is recorded only during the approved check', { timeout: 20000 }, async t => {
const f = fixture(t); pythonProject(f, onePass);
const host = await resolvePythonRuntime(f.project, { executable: process.env.AGENT_WORKBENCH_TEST_PYTHON });
execFileSync(host.baseExecutable, ['-I', '-m', 'venv', path.join(f.projectRoot, '.venv')], { windowsHide: true, cwd: f.root, stdio: 'pipe' });
// This scenario executes stdlib unittest. It needs a real project venv,
// not ensurepip's unrelated setuptools fixtures (overlong Windows paths).
execFileSync(host.baseExecutable, ['-I', '-X', 'utf8', '-m', 'venv', '--without-pip', path.join(f.projectRoot, '.venv')], { windowsHide: true, cwd: f.root, stdio: 'pipe' });
const runner = new CheckRunner(f.store); f.onCleanup(() => runner.stopAll());
const plan = await runner.plan(f.session);
assert.equal(plan.checks[0].python.runtime.status, 'deferred'); assert.equal(plan.checks[0].python.runtime.version, null);