Merge pull request #6425 from blueyed/xfail-yellow

terminal: use "yellow" with any "xpassed" tests
This commit is contained in:
Daniel Hahler 2020-01-09 23:22:58 +01:00 committed by GitHub
commit 1e28cb855d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1 @@
Use "yellow" main color with any XPASSED tests.

View File

@ -1107,7 +1107,7 @@ def _get_main_color(stats) -> Tuple[str, List[str]]:
# main color # main color
if "failed" in stats or "error" in stats: if "failed" in stats or "error" in stats:
main_color = "red" main_color = "red"
elif "warnings" in stats or unknown_type_seen: elif "warnings" in stats or "xpassed" in stats or unknown_type_seen:
main_color = "yellow" main_color = "yellow"
elif "passed" in stats: elif "passed" in stats:
main_color = "green" main_color = "green"

View File

@ -1385,10 +1385,10 @@ def test_terminal_summary_warnings_header_once(testdir):
), ),
("yellow", [("1 xpassed", {"bold": True, "yellow": True})], {"xpassed": (1,)}), ("yellow", [("1 xpassed", {"bold": True, "yellow": True})], {"xpassed": (1,)}),
( (
"green", "yellow",
[ [
("1 passed", {"bold": True, "green": True}), ("1 passed", {"bold": False, "green": True}),
("1 xpassed", {"bold": False, "yellow": True}), ("1 xpassed", {"bold": True, "yellow": True}),
], ],
{"xpassed": (1,), "passed": (1,)}, {"xpassed": (1,), "passed": (1,)},
), ),