e3.testsuite.report.display

Attributes

args_parser

KeyType

Classes

SupportsLessThan

Base class for protocol classes.

Functions

sorted_counters(→ List[Tuple[KeyType, int]])

Filter out the set of null counters and sort them.

summary_line(→ str)

Format a summary line to describe the result test result.

format_result_logs(→ List[str])

Return a human readable description for the result test result.

generate_report(→ None)

Generate a text report for testsuite results.

main(→ None)

Module Contents

e3.testsuite.report.display.args_parser
class e3.testsuite.report.display.SupportsLessThan

Bases: Protocol

Base class for protocol classes.

Protocol classes are defined as:

class Proto(Protocol):
    def meth(self) -> int:
        ...

Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).

For example:

class C:
    def meth(self) -> int:
        return 0

def func(x: Proto) -> int:
    return x.meth()

func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:

class GenProto[T](Protocol):
    def meth(self) -> T:
        ...
__lt__(other: SupportsLessThan) bool
e3.testsuite.report.display.KeyType
e3.testsuite.report.display.sorted_counters(counters: Dict[KeyType, int], key: Callable[[KeyType], SupportsLessThan]) List[Tuple[KeyType, int]]

Filter out the set of null counters and sort them.

e3.testsuite.report.display.summary_line(result: e3.testsuite.result.TestResultSummary, colors: e3.testsuite.utils.ColorConfig, show_time_info: bool) str

Format a summary line to describe the result test result.

Parameters:
  • colors – Proxy to introduce (or not) colors in the result.

  • show_time_info – Whether to include timing information in the result.

e3.testsuite.report.display.format_result_logs(result: e3.testsuite.result.TestResult, colors: e3.testsuite.utils.ColorConfig, show_error_output: bool, show_time_info: bool) List[str]

Return a human readable description for the result test result.

Parameters:
  • colors – Proxy to introduce (or not) colors in the result.

  • show_error_output – Whether to include the logs themselves: if False, only show the test name, status, message and timing info if requested.

  • show_time_info – Whether to include timing information in the result.

e3.testsuite.report.display.generate_report(output_file: IO[str], new_index: e3.testsuite.report.index.ReportIndex, old_index: e3.testsuite.report.index.ReportIndex | None, colors: e3.testsuite.utils.ColorConfig, show_all_logs: bool, show_xfail_logs: bool, show_error_output: bool, show_time_info: bool) None

Generate a text report for testsuite results.

Parameters:
  • output_file – Output file for the report.

  • new_index – Testsuite results to display.

  • old_index – Results from a previous testsuite run. If present, used to compute the new/already-detected/fixed regressions.

  • colors – Color configuration for the output.

  • show_all_logs – Whether to display logs for all testcases (successful tests are not displayed by default).

  • show_xfail_logs – Whether to display logs for XFAIL results (hidden by default).

  • show_error_output – Whether to display logs in test results.

  • show_time_info – Whether to display time information for test results, if available.

e3.testsuite.report.display.main(argv: List[str] | None = None) None