MCPcopy Create free account
hub / github.com/pytest-dev/pytest / deserialize_repr_entry

Function deserialize_repr_entry

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

Source from the content-addressed store, hash-verified

525 """
526
527 def deserialize_repr_entry(entry_data):
528 data = entry_data["data"]
529 entry_type = entry_data["type"]
530 if entry_type == "ReprEntry":
531 reprfuncargs = None
532 reprfileloc = None
533 reprlocals = None
534 if data["reprfuncargs"]:
535 reprfuncargs = ReprFuncArgs(**data["reprfuncargs"])
536 if data["reprfileloc"]:
537 reprfileloc = ReprFileLocation(**data["reprfileloc"])
538 if data["reprlocals"]:
539 reprlocals = ReprLocals(data["reprlocals"]["lines"])
540
541 reprentry: Union[ReprEntry, ReprEntryNative] = ReprEntry(
542 lines=data["lines"],
543 reprfuncargs=reprfuncargs,
544 reprlocals=reprlocals,
545 reprfileloc=reprfileloc,
546 style=data["style"],
547 )
548 elif entry_type == "ReprEntryNative":
549 reprentry = ReprEntryNative(data["lines"])
550 else:
551 _report_unserialization_failure(entry_type, TestReport, reportdict)
552 return reprentry
553
554 def deserialize_repr_traceback(repr_traceback_dict):
555 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