reports.DeletionResult

reports.DeletionResult(markdown, regenerable, gaps=())

The outcome of the deletion test of one unit.

Attributes

Name Type Description
markdown str The report, exactly what spotregen deletion-test prints.
regenerable bool True if the verdict is “regenerable”: every intent item has an evaluation, every dependent is declared and the unit check reports no error.
gaps tuple[Finding, …] The error findings of the unit check that stop the unit from being regenerable; empty exactly when regenerable is True.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen import deletion_test, load_spec, make_sample_repo

with TemporaryDirectory() as tmp:
    spec = load_spec(make_sample_repo(Path(tmp) / "demo"))
    result = deletion_test(spec, "core.calc")
    print(result.regenerable, len(result.gaps))
True 0