test: mutation-gate accepts python guard files (#42)

User-Visible: no
Issue: #42
This commit is contained in:
Codex
2026-08-30 21:34:32 +03:00
parent 10cdba8435
commit d274e38d57
+3 -1
View File
@@ -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} не существует`);