Merge pull request #6261 from blueyed/stats-keys

terminal: _get_main_color: help pytest-parallel
This commit is contained in:
Daniel Hahler
2019-11-22 17:12:33 +01:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1 @@
Fix compatibility with pytest-parallel (regression in pytest 5.3.0).

View File

@@ -1099,7 +1099,7 @@ def _get_main_color(stats) -> Tuple[str, List[str]]:
"failed passed skipped deselected xfailed xpassed warnings error".split()
)
unknown_type_seen = False
for found_type in stats:
for found_type in stats.keys():
if found_type not in known_types:
if found_type: # setup/teardown reports have an empty key, ignore them
known_types.append(found_type)