oct
Loading...
Searching...
No Matches
oct.mutation.report Namespace Reference

Functions

str render_list (Sequence[Mutant] mutants, str target)
str render_human (RunReport report)
list[str] _render_survivors (Sequence[MutantOutcome] survivors)
list[str] _render_timeouts (Sequence[MutantOutcome] timeouts)
str _format_rate (float|None rate)

Detailed Description

Purpose
-------
Render mutation results for humans without editorialising the numbers.

Responsibilities
----------------
- Render the enumeration-only listing used by ``--list``.
- Render totals, the kill rate, and one description per surviving mutant.
- Name the mutants that timed out, which no test run judged either way.

Diagnostics
-----------
Domain: OCT-MUTATION
Levels:
    L2 - lifecycle
    L3 - rendering details
    L4 - deep tracing

Contracts
---------
- Output is ASCII only, so a cp1252 console cannot turn a report into a crash.
- v1 is report-only: the rendered text states no verdict and no threshold.
- A survivor is described by its id, its source line, and its before/after form.

Dependencies
------------
- oct.mutation.engine (mutant records)
- oct.mutation.runner (run results)

Function Documentation

◆ _format_rate()

str oct.mutation.report._format_rate ( float | None rate)
protected
Render the kill rate as a percentage, or ``n/a`` when nothing ran.

Definition at line 108 of file report.py.

◆ _render_survivors()

list[str] oct.mutation.report._render_survivors ( Sequence[MutantOutcome] survivors)
protected
Render one description per surviving mutant, or say there were none.

Definition at line 80 of file report.py.

Here is the caller graph for this function:

◆ _render_timeouts()

list[str] oct.mutation.report._render_timeouts ( Sequence[MutantOutcome] timeouts)
protected
Render the mutants that exceeded the timeout and were never judged.

Definition at line 94 of file report.py.

Here is the caller graph for this function:

◆ render_human()

str oct.mutation.report.render_human ( RunReport report)
Render totals, the kill rate, survivors, and any unjudged timeouts.

Definition at line 58 of file report.py.

Here is the call graph for this function:

◆ render_list()

str oct.mutation.report.render_list ( Sequence[Mutant] mutants,
str target )
Render the enumeration produced by ``--list``, which runs nothing.

Definition at line 47 of file report.py.