gui.model.MutationScore

gui.model.MutationScore(unit, planted, killed, baseline_passed, survivors=())

The result of spotregen mutate, read from its score.toml.

Attributes

Name Type Description
unit str The unit that was mutated.
planted int The number of mutants run.
killed int The number the evaluations caught.
baseline_passed int The number of tests that passed on the unchanged unit.
survivors tuple[str, …] One line per mutant that survived: id, line and change.

Examples

from spotregen.gui.model import MutationScore

score = MutationScore("core.calc", 4, 3, 5, ("m3 line 9: + -> -",))
print(score.fraction, score.survived)
print(score.summary())
3/4 1
core.calc: 3/4 mutants killed
survived: m3 line 9: + -> -

Methods

Name Description
summary A few lines for the result pane.

summary

gui.model.MutationScore.summary()

A few lines for the result pane.

Returns

Name Type Description
str str The score and one line per surviving mutant.