Skip to content

Session Result¤

SessionResult dataclass ¤

SessionResult(
    session_id: str,
    start_timestamp: str,
    stop_timestamp: str,
    python: PythonDistribution,
    pytest_version: str,
    plugin_version: str,
    exit_status: int,
    errors: list[ErrorMessage],
    warnings: list[WarningMessage],
    collect_reports: list[CollectReport],
    test_reports: list[TestCaseReport],
    project: Project | None = None,
)

Result of a pytest session, including collect reports and test reports.

Attributes:

Name Type Description
collect_reports list[CollectReport]

Collect reports generated during the session.

errors list[ErrorMessage]

Errors generated during the session.

exit_status int

The exit status of the pytest run. 0 indicates success, non-zero indicates failure.

plugin_version str

The version of the plugin that generated the report.

project Project | None

The project that is being tested.

pytest_version str

The version of pytest that generated the report.

python PythonDistribution

The Python distribution that ran the tests.

session_id str

The unique if of this test session.

start_timestamp str

The start time of the pytest session in ISO 8601 format.

stop_timestamp str

The stop time of the pytest session in ISO 8601 format.

test_reports list[TestCaseReport]

Test reports generated during the session.

warnings list[WarningMessage]

Warnings generated during the session.

collect_reports instance-attribute ¤

collect_reports: list[CollectReport]

Collect reports generated during the session.

errors instance-attribute ¤

errors: list[ErrorMessage]

Errors generated during the session.

exit_status instance-attribute ¤

exit_status: int

The exit status of the pytest run. 0 indicates success, non-zero indicates failure.

plugin_version instance-attribute ¤

plugin_version: str

The version of the plugin that generated the report.

project class-attribute instance-attribute ¤

project: Project | None = None

The project that is being tested.

pytest_version instance-attribute ¤

pytest_version: str

The version of pytest that generated the report.

python instance-attribute ¤

The Python distribution that ran the tests.

session_id instance-attribute ¤

session_id: str

The unique if of this test session.

start_timestamp instance-attribute ¤

start_timestamp: str

The start time of the pytest session in ISO 8601 format.

stop_timestamp instance-attribute ¤

stop_timestamp: str

The stop time of the pytest session in ISO 8601 format.

test_reports instance-attribute ¤

test_reports: list[TestCaseReport]

Test reports generated during the session.

warnings instance-attribute ¤

warnings: list[WarningMessage]

Warnings generated during the session.