mutmut
mutmut copied to clipboard
mutmut "ignoring" test
Hi, I'm trying out mutmut on https://github.com/SebRut/pygrocy and mutmut reports this mutant (affected file):
+++ pygrocy/data_models/meal_items.py
@@ -13,7 +13,7 @@
def __init__(self, response: RecipeDetailsResponse):
self._id = response.id
self._name = response.name
- self._description = response.description
+ self._description = None
self._base_servings = response.base_servings
self._desired_servings = response.desired_servings
self._picture_file_name = response.picture_file_name
In my opinion this mutant should be killed with this line and indeed when running my tests manually using pytest
and applying the mutant the test fails at the linked location.
Maybe the cache is doing this? You could try deleting .mutmut_cache
I'm pretty sure I tried this before, but I'll give it another shot.
Ok, I ran mutmut run
again after removing .mutmut_cache
but the mutant (and other mutants with similar issues that should be killed) still shows up.
That's strange. And if you do mutmut apply <id>
you get the mutant you expect on disk and the tests fails?
Yep, I recorded my repro steps here, maybe I'm missing something obvious: https://asciinema.org/a/YuWUnK3cmJtqvj1XLvVkRFMqW
Nice use of asciinema! I wouldn't have thought of that :P
Yea that looks pretty clear cut.
I’m running into this issue as well.