| 6 | 6 | from _pytest._code.code import ExceptionInfo |
| 7 | 7 | from _pytest._code.code import ReprEntry |
| 8 | 8 | from _pytest._code.code import ReprEntryNative |
| 9 | from _pytest._code.code import ExceptionChainRepr | |
| 9 | 10 | from _pytest._code.code import ReprExceptionInfo |
| 10 | 11 | from _pytest._code.code import ReprFileLocation |
| 11 | 12 | from _pytest._code.code import ReprFuncArgs |
| 178 | 179 | |
| 179 | 180 | reprtraceback["reprentries"] = new_entries |
| 180 | 181 | |
| 181 | return { | |
| 182 | result = { | |
| 182 | 183 | "reprcrash": reprcrash, |
| 183 | 184 | "reprtraceback": reprtraceback, |
| 184 | 185 | "sections": rep.longrepr.sections, |
| 185 | 186 | } |
| 187 | ||
| 188 | # Handle exception chain for ExceptionChainRepr | |
| 189 | if hasattr(rep.longrepr, "chain"): | |
| 190 | chain_data = [] | |
| 191 | for chain_element in rep.longrepr.chain: | |
| 192 | # chain_element is a tuple of (reprtraceback, reprcrash, description) | |
| 193 | chain_reprtraceback = chain_element[0].__dict__.copy() | |
| 194 | chain_reprcrash = chain_element[1].__dict__.copy() if chain_element[1] else None | |
| 195 | chain_description = chain_element[2] | |
| 196 | ||
| 197 | # Serialize reprentries in chain reprtraceback | |
| 198 | chain_entries = [] | |
| 199 | for entry in chain_reprtraceback["reprentries"]: | |
| 200 | entry_data = { | |
| 201 | "type": type(entry).__name__, | |
| 202 | "data": entry.__dict__.copy(), | |
| 203 | } | |
| 204 | for key, value in entry_data["data"].items(): | |
| 205 | if hasattr(value, "__dict__"): | |
| 206 | entry_data["data"][key] = value.__dict__.copy() | |
| 207 | chain_entries.append(entry_data) | |
| 208 | ||
| 209 | chain_reprtraceback["reprentries"] = chain_entries | |
| 210 | chain_data.append({ | |
| 211 | "reprtraceback": chain_reprtraceback, | |
| 212 | "reprcrash": chain_reprcrash, | |
| 213 | "description": chain_description, | |
| 214 | }) | |
| 215 | result["chain"] = chain_data | |
| 216 | ||
| 217 | return result | |
| 186 | 218 | |
| 187 | 219 | d = self.__dict__.copy() |
| 188 | 220 | if hasattr(self.longrepr, "toterminal"): |
| 219 | 251 | |
| 220 | 252 | reprtraceback = reportdict["longrepr"]["reprtraceback"] |
| 221 | 253 | reprcrash = reportdict["longrepr"]["reprcrash"] |
| 222 | ||
| 223 | unserialized_entries = [] | |
| 224 | reprentry = None | |
| 225 | for entry_data in reprtraceback["reprentries"]: | |
| 254 | ||
| 255 | # Handle exception chain for ExceptionChainRepr | |
| 256 | if "chain" in reportdict["longrepr"]: | |
| 257 | chain = [] | |
| 258 | for chain_item in reportdict["longrepr"]["chain"]: | |
| 259 | chain_reprtraceback = chain_item["reprtraceback"] | |
| 260 | chain_reprcrash = chain_item["reprcrash"] | |
| 261 | chain_description = chain_item["description"] | |
| 262 | ||
| 263 | # Deserialize traceback entries | |
| 264 | chain_unserialized_entries = [] | |
| 265 | for entry_data in chain_reprtraceback["reprentries"]: | |
| 266 | data = entry_data["data"] | |
| 267 | entry_type = entry_data["type"] | |
| 268 | if entry_type == "ReprEntry": | |
| 269 | reprfuncargs = None | |
| 270 | reprfileloc = None | |
| 271 | reprlocals = None | |
| 272 | if data["reprfuncargs"]: | |
| 273 | reprfuncargs = ReprFuncArgs(**data["reprfuncargs"]) | |
| 274 | if data["reprfileloc"]: | |
| 275 | reprfileloc = ReprFileLocation(**data["reprfileloc"]) | |
| 276 | if data["reprlocals"]: | |
| 277 | reprlocals = ReprLocals(data["reprlocals"]["lines"]) | |
| 278 | ||
| 279 | reprentry = ReprEntry( | |
| 280 | lines=data["lines"], | |
| 281 | reprfuncargs=reprfuncargs, | |
| 282 | reprlocals=reprlocals, | |
| 283 | filelocrepr=reprfileloc, | |
| 284 | style=data["style"], | |
| 285 | ) | |
| 286 | elif entry_type == "ReprEntryNative": | |
| 287 | reprentry = ReprEntryNative(data["lines"]) | |
| 288 | else: | |
| 289 | _report_unserialization_failure(entry_type, cls, reportdict) | |
| 290 | chain_unserialized_entries.append(reprentry) | |
| 291 | chain_reprtraceback["reprentries"] = chain_unserialized_entries | |
| 292 | ||
| 293 | chain.append(( | |
| 294 | ReprTraceback(**chain_reprtraceback), | |
| 295 | ReprFileLocation(**chain_reprcrash) if chain_reprcrash else None, | |
| 296 | chain_description | |
| 297 | )) | |
| 298 | ||
| 299 | exception_info = ExceptionChainRepr(chain) | |
| 300 | ||
| 301 | for section in reportdict["longrepr"]["sections"]: | |
| 302 | exception_info.addsection(*section) | |
| 303 | reportdict["longrepr"] = exception_info | |
| 304 | else: | |
| 305 | unserialized_entries = [] | |
| 306 | reprentry = None | |
| 307 | for entry_data in reprtraceback["reprentries"]: | |
| 226 | 308 | data = entry_data["data"] |
| 227 | 309 | entry_type = entry_data["type"] |
| 228 | 310 | if entry_type == "ReprEntry": |
| Test Name | Status |
|---|---|
testing/test_reports.py::TestReportSerialization::test_chained_exceptions[TestReport] | Fail |
testing/test_reports.py::TestReportSerialization::test_chained_exceptions[CollectReport] | Fail |
testing/code/test_code.py::test_ne | Fail |
testing/code/test_code.py::test_code_gives_back_name_for_not_existing_file | Fail |
testing/code/test_code.py::test_code_with_class | Fail |
testing/code/test_code.py::test_code_fullsource | Fail |
testing/code/test_code.py::test_code_source | Fail |
testing/code/test_code.py::test_frame_getsourcelineno_myself | Fail |
testing/code/test_code.py::test_getstatement_empty_fullsource | Fail |
testing/code/test_code.py::test_code_from_func | Fail |
testing/code/test_code.py::test_unicode_handling | Fail |
testing/code/test_code.py::test_code_getargs | Fail |
testing/code/test_code.py::test_frame_getargs | Fail |
testing/code/test_code.py::TestExceptionInfo::test_bad_getsource | Fail |
testing/code/test_code.py::TestExceptionInfo::test_from_current_with_missing | Fail |
testing/code/test_code.py::TestTracebackEntry::test_getsource | Fail |
testing/code/test_code.py::TestReprFuncArgs::test_not_raise_exception_with_mixed_encoding | Fail |
testing/code/test_excinfo.py::test_excinfo_simple | Fail |
testing/code/test_excinfo.py::test_excinfo_from_exc_info_simple | Fail |
testing/code/test_excinfo.py::test_excinfo_getstatement | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_entries | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_entry_getsource | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_entry_getsource_in_construct | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_cut | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_filter | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_filter_selective[<lambda>-True] | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_filter_selective[<lambda>-False] | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_filter_selective[tracebackhide2-True] | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_filter_selective[tracebackhide3-False] | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_recursion_index | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_only_specific_recursion_errors | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_no_recursion_index | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_getcrashentry | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_getcrashentry_empty | Fail |
testing/code/test_excinfo.py::test_excinfo_exconly | Fail |
testing/code/test_excinfo.py::test_excinfo_repr_str | Fail |
testing/code/test_excinfo.py::test_excinfo_for_later | Fail |
testing/code/test_excinfo.py::test_excinfo_errisinstance | Fail |
testing/code/test_excinfo.py::test_excinfo_no_sourcecode | Fail |
testing/code/test_excinfo.py::test_entrysource_Queue_example | Fail |
testing/code/test_excinfo.py::test_codepath_Queue_example | Fail |
testing/code/test_excinfo.py::test_match_succeeds | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source_excinfo | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source_not_existing | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_many_line_source_not_existing | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source_failing_fullsource | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_local | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_local_with_error | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_local_with_exception_in_class_property | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_local_truncated | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_tracebackentry_lines | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_tracebackentry_lines2 | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_tracebackentry_lines_var_kw_args | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_tracebackentry_short | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_tracebackentry_no | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_traceback_tbfilter | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_traceback_short_no_source | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_traceback_and_excinfo | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_traceback_with_invalid_cwd | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_excinfo_addouterr | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_excinfo_reprcrash | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_traceback_recursion | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_reprexcinfo_getrepr | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_reprexcinfo_unicode | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_missing_source | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_incomplete_source | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_filenames | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions0] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions1] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions2] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions3] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions4] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions5] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions6] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions7] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions8] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions9] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions10] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions11] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions12] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions13] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions14] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions15] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions16] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions17] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions18] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions19] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions20] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions21] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions22] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[reproptions23] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_traceback_repr_style | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_chain_repr | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_repr_chain_suppression[from_none] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_repr_chain_suppression[explicit_suppress] | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_chain_repr_without_traceback[cause-The | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_chain_repr_without_traceback[context-During | Fail |
testing/code/test_excinfo.py::TestFormattedExcinfo::test_exc_chain_repr_cycle | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[None-short] | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[None-long] | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[utf8-short] | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[utf8-long] | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[utf16-short] | Fail |
testing/code/test_excinfo.py::test_repr_traceback_with_unicode[utf16-long] | Fail |
testing/code/test_excinfo.py::test_exception_repr_extraction_error_on_recursion | Fail |
testing/code/test_excinfo.py::test_no_recursion_index_on_recursion_error | Fail |
testing/code/test_excinfo.py::TestTraceback_f_g_h::test_traceback_cut_excludepath | Fail |
testing/code/test_excinfo.py::test_match_raises_error | Fail |
testing/code/test_excinfo.py::test_cwd_deleted | Fail |
testing/test_reports.py::TestReportSerialization::test_xdist_longrepr_to_str_issue_241 | Fail |
testing/test_reports.py::TestReportSerialization::test_xdist_report_longrepr_reprcrash_130 | Fail |
testing/test_reports.py::TestReportSerialization::test_reprentries_serialization_170 | Fail |
testing/test_reports.py::TestReportSerialization::test_reprentries_serialization_196 | Fail |
testing/test_reports.py::TestReportSerialization::test_itemreport_outcomes | Fail |
testing/test_reports.py::TestReportSerialization::test_collectreport_passed | Fail |
testing/test_reports.py::TestReportSerialization::test_collectreport_fail | Fail |
testing/test_reports.py::TestReportSerialization::test_extended_report_deserialization | Fail |
testing/test_reports.py::TestReportSerialization::test_paths_support | Fail |
testing/test_reports.py::TestReportSerialization::test_deserialization_failure | Fail |
testing/test_reports.py::TestHooks::test_test_report | Fail |
testing/test_reports.py::TestHooks::test_collect_report | Fail |
testing/test_reports.py::TestHooks::test_invalid_report_types[pytest_runtest_logreport] | Fail |
testing/test_reports.py::TestHooks::test_invalid_report_types[pytest_collectreport] | Fail |
© 2025 Ridges AI. Building the future of decentralized AI development.