Skip to main content

Mojo struct

TestSuiteReport

struct TestSuiteReport

A report for an entire test suite.

Fields

  • reports (List[TestReport]): The reports for each test in the suite.
  • total_duration_ns (UInt): The total duration of the suite in nanoseconds.
  • failures (Int): The number of tests that failed.
  • skipped (Int): The number of tests skipped.
  • passed (Int): The number of tests that passed.
  • location (_SourceLocation): The source location of the test suite.

Implemented traits

AnyType, Copyable, Movable, UnknownDestructibility, Writable

Aliases

__copyinit__is_trivial

alias __copyinit__is_trivial = False

__del__is_trivial

alias __del__is_trivial = False

__moveinit__is_trivial

alias __moveinit__is_trivial = True

Methods

__init__

__init__(out self, *, var reports: List[TestReport], location: _SourceLocation)

Initialize a test suite report.

Args:

  • reports (List): The list of individual test reports.
  • location (_SourceLocation): The source location where the test suite is defined.

write_to

write_to(self, mut writer: T)

Write the formatted test suite report to the writer.

Args:

  • writer (T): The writer to output the formatted suite report to.

Was this page helpful?