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

Function deserialize_repr_entry

src/_pytest/reports.py:621–646  ·  view source on GitHub ↗
(entry_data)

Source from the content-addressed store, hash-verified

619 """
620
621 def deserialize_repr_entry(entry_data):
622 data = entry_data["data"]
623 entry_type = entry_data["type"]
624 if entry_type == "ReprEntry":
625 reprfuncargs = None
626 reprfileloc = None
627 reprlocals = None
628 if data["reprfuncargs"]:
629 reprfuncargs = ReprFuncArgs(**data["reprfuncargs"])
630 if data["reprfileloc"]:
631 reprfileloc = ReprFileLocation(**data["reprfileloc"])
632 if data["reprlocals"]:
633 reprlocals = ReprLocals(data["reprlocals"]["lines"])
634
635 reprentry: ReprEntry | ReprEntryNative = ReprEntry(
636 lines=data["lines"],
637 reprfuncargs=reprfuncargs,
638 reprlocals=reprlocals,
639 reprfileloc=reprfileloc,
640 style=data["style"],
641 )
642 elif entry_type == "ReprEntryNative":
643 reprentry = ReprEntryNative(data["lines"])
644 else:
645 _report_unserialization_failure(entry_type, TestReport, reportdict)
646 return reprentry
647
648 def deserialize_repr_traceback(repr_traceback_dict):
649 repr_traceback_dict["reprentries"] = [

Callers 1

Calls 6

ReprFuncArgsClass · 0.90
ReprFileLocationClass · 0.90
ReprLocalsClass · 0.90
ReprEntryClass · 0.90
ReprEntryNativeClass · 0.90

Tested by

no test coverage detected