Run mutate-changes in-process in its tests, so mutmut sees the code they reach, and kill the mutants of mutmut_setup and mutmut_mutants that change behaviour
This commit is contained in:
@@ -78,4 +78,4 @@ def defined(tree: ast.Module, key: str) -> ast.AsyncFunctionDef | ast.FunctionDe
|
||||
def as_named(lines: list[str], function: ast.AsyncFunctionDef | ast.FunctionDef, name: str) -> list[str]:
|
||||
"""A function's lines from its def, decorators left out, with the def naming it name."""
|
||||
spanned = lines[function.lineno - 1:function.end_lineno]
|
||||
return [spanned[0].replace(function.name, name, 1), *spanned[1:]] if spanned else []
|
||||
return [spanned[0].replace(function.name, name), *spanned[1:]]
|
||||
|
||||
Reference in New Issue
Block a user