mutation.score_toml(report)
The full result as TOML, one [[mutant]] table per mutant, for archiving.
Parameters
| report |
ScoreReport |
The result of mutation_score. |
required |
Returns
| str |
str |
TOML text with unit, the spotregen version, evaluations, baseline_passed, planted, killed and the mutants. |
Examples
import tomllib
from spotregen.mutation import (
MutantResult, ScoreReport, generate_mutants, score_toml,
)
mutants = generate_mutants("X = 1\n")
report = ScoreReport("pkg.x", ("t.py",), 1, (MutantResult(mutants[0], True, "1 failed"),))
print(tomllib.loads(score_toml(report))["killed"])