I used mutmut yesterday to evaluate the unit test quality of some of my projects. I tried cosmic-ray before, but it was unusable (bugs, performance). I also tried mut.py, but I also couldn’t get that one startd.

One issue when using mutmut I found is that it gives too many false-positives: Results where – according to mutmut – at least one unit test should have failed, but it didn’t. Most of the cases I observed were string changes:

# mutmut adds 'XX' to the following strings:
__version__ = "0.1.2"
ValueError("Explanation about the cause of the error")
logging.info("Starting to execute xy.")

All of those should not get a mutation in the first place. I don’t want to add # pragma: no mutate to all of those lines. I simply want to delete / skip / ignore this type of mutation in mutmut (which should also speed the execution up, I hope).

Is this possible?