Skip to content

Commit a9c8e46

Browse files
authored
Merge pull request data-apis#260 from oleksandr-pavlyk/handle-runs-with-no-warnings
Handle runs of sub-tests where no warnings arise
2 parents 82c3ec4 + 5ca1212 commit a9c8e46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reporting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def pytest_json_modifyreport(json_report):
103103
# doesn't store a full stack of where it was issued from. The resulting
104104
# warnings will be in order of the first time each warning is issued since
105105
# collections.Counter is ordered just like dict().
106-
counted_warnings = Counter([frozenset(i.items()) for i in json_report['warnings']])
106+
counted_warnings = Counter([frozenset(i.items()) for i in json_report.get('warnings', dict())])
107107
deduped_warnings = [{**dict(i), 'count': counted_warnings[i]} for i in counted_warnings]
108108

109109
json_report['warnings'] = deduped_warnings

0 commit comments

Comments
 (0)