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
This mutation is syntactically valid, and thus should be tried. Consequently, simply avoiding replacing / with * in function signatures is not sufficient.
If there is not an obvious way to only generate the syntactically correct mutants, is there a way to guarantee that mutants with syntax errors are not marked as survived?
The text was updated successfully, but these errors were encountered:
Yea I guess we should load the resulting file with the ast standard library and if it's invalid just mark it as killed. This should be super fast and just a clean win.
I have an odd false-positive surviving mutant (when using the standard pytest runner) involving positional-only and keyword-only arguments.
Consider this function, with two positional-only arguments:
mutmut
tried one mutation which is syntactically invalid (but somehow was still marked as survived???)Ideally,
mutmut
wouldn't generate this mutation because it's a SyntaxError.However, it is only a syntax error if the
*
and**kwargs
are adjacent (i.e. no explicitly named parameters). Consider this:This mutation is syntactically valid, and thus should be tried. Consequently, simply avoiding replacing
/
with*
in function signatures is not sufficient.If there is not an obvious way to only generate the syntactically correct mutants, is there a way to guarantee that mutants with syntax errors are not marked as survived?
The text was updated successfully, but these errors were encountered: