Mutation trampoline fixes #375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While testing I found two errors in the mutation setup:
The same-args bug only occurs when calling methods with the keywords
origormutants. e.g. iffoo(orig=123)was called somewhere. This already fails at the clean test run, so nobody reporting it as an issue seems like no one uses these kwargs. I only noticed when running mutmut on mutmut self.The self-parameter bug killed all class method mutations, because the mutations did not receive
selfas an argument and are not bound to any class instance. Unluckily, it worked for the original method, because the original method is passed as a bound method and does not requireselfto be passed as an argument, so the clean tests run did not notice this error. Fixing this bug will result in a decent amount of new survived mutants for projects that use classes.The commit messages contain more technical details. For the self-parameter bug, I will submit an E2E snapshot test in the next days that would detect a regression that accidentally introduces it again.