terminal: _get_main_color: help pytest-parallel
Use `dict.keys()` to work around `__iter__` not working with a multiprocessing DictProxy. Ref: https://github.com/python/cpython/pull/17333 Fixes https://github.com/pytest-dev/pytest/issues/6254. Ref: https://github.com/browsertron/pytest-parallel/issues/36
This commit is contained in:
parent
63c9ad02f4
commit
1f736a663d
|
@ -0,0 +1 @@
|
|||
Fix compatibility with pytest-parallel (regression in pytest 5.3.0).
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue