-
Notifications
You must be signed in to change notification settings - Fork 135
Description
In several issues paths_to_mutate was used to select specific files that should be mutated (For instance, see #370). Given the name, this is a natural interpretation of what it does, and the docs do not clearly say otherwise. However, mutmut uses it as paths to the source code (/packages / modules; not sure about the terminology), and it needs to contain all the code necessary to run the test suite.
I would consider to rename it (e.g. to source_paths) and make paths_to_mutate a deprecated alias for it, showing a warning that suggests switching to source_paths.
Also, apparently people want to configure which files are mutated in the source code. Similar to the do_not_mutate config, we could have a only_mutate option, taking a list of paths that we mutate. Something similar is possible with the CLI positional arg (e.g. mutmut run "narwhals._arrow.series*"), but this only changes which mutants get tested, not which files are mutated on the disk.