From d274e38d573a1e213b985199cbfd8999e3e8d454 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 30 Aug 2026 17:18:18 +0300 Subject: [PATCH] test: mutation-gate accepts python guard files (#42) User-Visible: no Issue: #42 --- test/mutation-gate.test.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/mutation-gate.test.mjs b/test/mutation-gate.test.mjs index bb3cf3be..d76e4311 100644 --- a/test/mutation-gate.test.mjs +++ b/test/mutation-gate.test.mjs @@ -35,7 +35,9 @@ test('every mutant patch anchors exactly once in the current source', () => { test('every guard command points at a file that exists', () => { for (const mutant of MUTANTS) { - const script = mutant.guard.split(' ').find((part) => part.endsWith('.mjs')); + // #42: python guards are legal now — the first pytest-scanner mutants + const script = mutant.guard.split(' ') + .find((part) => part.endsWith('.mjs') || part.endsWith('.py')); assert.ok(script, `${mutant.id}: guard не называет исполняемый файл`); assert.ok(existsSync(join(repoRoot, script)), `${mutant.id}: guard-файла ${script} не существует`);