Run mutate-changes on a script its tests import by file name, and name a crash inside mutmut in one line

This commit is contained in:
Lilleman
2026-11-20 19:12:10 +01:00
parent cd8e335c3e
commit 91cf86e0cd
6 changed files with 106 additions and 5 deletions
+3 -2
View File
@@ -8,10 +8,11 @@ extension, and leaves out test files: test_*.py, *_test.py, conftest.py, *.test.
or __tests__/ folder.
- .py: mutmut 3, in a scratch copy of the nearest folder above the file that holds a setup.cfg or a pyproject.toml, else of the
checkout's top. It mutates each function or method a changed line falls in, and counts the mutants on changed lines. The
checkout's top, but a file that a test beside it imports by its file name, as `import run_harness`, from its own folder, which
has no setup.cfg or pyproject.toml. It mutates each function or method a changed line falls in, and counts the mutants on changed lines. The
folder's setup.cfg settings stay, but source_paths and also_copy are set, and pytest leaves out each test that fails without a
mutant; the report names their files. mutmut sees only the code a test runs in its own process, so a mutant that only a child
process reaches, such as a tool a test starts, shows as `no tests`. A pyproject.toml with a [tool.mutmut] section fails the run.
process reaches, such as a tool a test starts, shows as `no tests`. A pyproject.toml with a [tool.mutmut] section fails the run, and so does a crash inside mutmut, in one line that names the error.
- .rs: cargo-mutants, as `cargo mutants --in-diff`, in the checkout's top.
- .cjs, .cts, .js, .jsx, .mjs, .mts, .ts, .tsx: Stryker, as `npx --no --package=@stryker-mutator/core stryker run --mutate` on the
changed lines, in the nearest folder above the file that holds a package.json. A file with no package.json above it isn't