Serialization / Deserialization was dropping longrepr.sections
This commit is contained in:
@@ -114,7 +114,8 @@ def serialize_report(rep):
|
||||
|
||||
return {
|
||||
'reprcrash': reprcrash,
|
||||
'reprtraceback': reprtraceback
|
||||
'reprtraceback': reprtraceback,
|
||||
'sections': rep.longrepr.sections
|
||||
}
|
||||
|
||||
import py
|
||||
|
||||
@@ -359,10 +359,14 @@ def unserialize_report(name, reportdict):
|
||||
unserialized_entries.append(reprentry)
|
||||
reprtraceback['reprentries'] = unserialized_entries
|
||||
|
||||
reportdict['longrepr'] = ReprExceptionInfo(
|
||||
exception_info = ReprExceptionInfo(
|
||||
reprtraceback=ReprTraceback(**reprtraceback),
|
||||
reprcrash=ReprFileLocation(**reprcrash),
|
||||
)
|
||||
|
||||
for section in reportdict['longrepr']['sections']:
|
||||
exception_info.addsection(*section)
|
||||
reportdict['longrepr'] = exception_info
|
||||
return reportdict
|
||||
|
||||
if name == "testreport":
|
||||
|
||||
Reference in New Issue
Block a user