Create either a TestReport or CollectReport, depending on the calling class. It is the callers responsibility to know which class to pass here. This was originally the serialize_report() function from xdist (ca03269). Experimental method.
(cls, reportdict: dict[str, object])
| 230 | |
| 231 | @classmethod |
| 232 | def _from_json(cls, reportdict: dict[str, object]) -> Self: |
| 233 | """Create either a TestReport or CollectReport, depending on the calling class. |
| 234 | |
| 235 | It is the callers responsibility to know which class to pass here. |
| 236 | |
| 237 | This was originally the serialize_report() function from xdist (ca03269). |
| 238 | |
| 239 | Experimental method. |
| 240 | """ |
| 241 | kwargs = _report_kwargs_from_json(reportdict) |
| 242 | return cls(**kwargs) |
| 243 | |
| 244 | |
| 245 | def _report_unserialization_failure( |