We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82c3ec4 + 5ca1212 commit a9c8e46Copy full SHA for a9c8e46
reporting.py
@@ -103,7 +103,7 @@ def pytest_json_modifyreport(json_report):
103
# doesn't store a full stack of where it was issued from. The resulting
104
# warnings will be in order of the first time each warning is issued since
105
# collections.Counter is ordered just like dict().
106
- counted_warnings = Counter([frozenset(i.items()) for i in json_report['warnings']])
+ counted_warnings = Counter([frozenset(i.items()) for i in json_report.get('warnings', dict())])
107
deduped_warnings = [{**dict(i), 'count': counted_warnings[i]} for i in counted_warnings]
108
109
json_report['warnings'] = deduped_warnings
0 commit comments