You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ternary operator errors of not covering both branches can't be detected by coverage, so it would be useful to mutate these to enable/disable each branch. E.g.
mark="x"ifcount%2else"o"
mutation into:
mark="x"ifcount%2andFalseelse"o"
and
mark="x"ifcount%2orTrueelse"o"
This types of mutations aren't as useful for normal if statements, because branch coverage can detect when one of the alternatives isn't covered.
The text was updated successfully, but these errors were encountered:
I would love to see this get done. My workaround is to keep a special git stash of changes to replace all ternaries with expanded if/else blocks. And mutation testing with this stash of changes did give me a surviving mutant in some private code I was working on. (I actually use my own fork with some extra hackage to raise a RuntimeError in case it finds any ternaries in the code to mutate.)
When I tried hacking in the existing code, it looks like the code in __init__.py can handle multiple mutations of single tokens such as operators, but not for anything bigger at this time. I am sure it should be pretty straightforward to update the code to support multiple mutations of larger pieces of code, unfortunately I have not yet succeeded with this.
Ternary operator errors of not covering both branches can't be detected by coverage, so it would be useful to mutate these to enable/disable each branch. E.g.
mutation into:
and
This types of mutations aren't as useful for normal if statements, because branch coverage can detect when one of the alternatives isn't covered.
The text was updated successfully, but these errors were encountered: