MCPcopy
hub / github.com/pytest-dev/pytest / pytest_report_to_serializable

Function pytest_report_to_serializable

src/_pytest/reports.py:516–524  ·  view source on GitHub ↗
(
    report: CollectReport | TestReport,
)

Source from the content-addressed store, hash-verified

514
515
516def pytest_report_to_serializable(
517 report: CollectReport | TestReport,
518) -> dict[str, Any] | None:
519 if isinstance(report, TestReport | CollectReport):
520 data = report._to_json()
521 data["$report_type"] = report.__class__.__name__
522 return data
523 # TODO: Check if this is actually reachable.
524 return None # type: ignore[unreachable]
525
526
527def pytest_report_from_serializable(

Callers

nothing calls this directly

Calls 1

_to_jsonMethod · 0.45

Tested by

no test coverage detected