Closed johnaugustflynn closed 1 month ago
Another way to think about this would be shuffle. Since mutants are a fixed set, sampling is the same as shuffling before starting really.
Makes sense. So does that mean you are open to this?
Yes. For sure.
Duplicate of #278
Also, I released mutmut 3 which WAY faster, so this issue isn't as critical anymore I think.
Given how expensive mutation testing is, I think it would be valuable to have the option of only testing a random sample of mutations. This could still give you a decent idea of your test quality and some common themes of surviving mutants, without the lengthy runtime required for exhaustively testing thousands of mutants. Some other mutation testing packages already support this, but I like mutmut and would love to see it here.
I am imagining something like
mutmut run --random-sample 0.4 --random-seed 42
I'd be open to contributing a PR if maintainer(s) are interested.