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

Function pytest_report_from_serializable

src/_pytest/reports.py:527–538  ·  view source on GitHub ↗
(
    data: dict[str, Any],
)

Source from the content-addressed store, hash-verified

525
526
527def pytest_report_from_serializable(
528 data: dict[str, Any],
529) -> CollectReport | TestReport | None:
530 if "$report_type" in data:
531 if data["$report_type"] == "TestReport":
532 return TestReport._from_json(data)
533 elif data["$report_type"] == "CollectReport":
534 return CollectReport._from_json(data)
535 assert False, "Unknown report_type unserialize data: {}".format(
536 data["$report_type"]
537 )
538 return None
539
540
541def _report_to_json(report: BaseReport) -> dict[str, Any]:

Callers

nothing calls this directly

Calls 2

_from_jsonMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected