test(repo): Prevent Python test bytecode drift

Set PYTHONDONTWRITEBYTECODE for the shared Python runner and the
root test-suite launcher so local test runs do not create __pycache__
artifacts inside skills.

This keeps npm run test deterministic and avoids false negatives in the
editorial bundle inventory checks.
This commit is contained in:
sickn33
2026-03-29 09:27:19 +02:00
parent 08a31cacf5
commit 3367cf2fdd
2 changed files with 13 additions and 1 deletions

View File

@@ -58,7 +58,13 @@ function isNetworkTestsEnabled() {
}
function runNodeCommand(args) {
const result = spawnSync(process.execPath, args, { stdio: "inherit" });
const result = spawnSync(process.execPath, args, {
env: {
...process.env,
PYTHONDONTWRITEBYTECODE: process.env.PYTHONDONTWRITEBYTECODE || "1",
},
stdio: "inherit",
});
if (result.error) {
throw result.error;