Skip to content

Commit 1e28cb8

Browse files
authored
Merge pull request #6425 from blueyed/xfail-yellow
terminal: use "yellow" with any "xpassed" tests
2 parents 29db2da + 13baab7 commit 1e28cb8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

changelog/449.improvement.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use "yellow" main color with any XPASSED tests.

src/_pytest/terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def _get_main_color(stats) -> Tuple[str, List[str]]:
11071107
# main color
11081108
if "failed" in stats or "error" in stats:
11091109
main_color = "red"
1110-
elif "warnings" in stats or unknown_type_seen:
1110+
elif "warnings" in stats or "xpassed" in stats or unknown_type_seen:
11111111
main_color = "yellow"
11121112
elif "passed" in stats:
11131113
main_color = "green"

testing/test_terminal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,10 +1385,10 @@ def test_failure():
13851385
),
13861386
("yellow", [("1 xpassed", {"bold": True, "yellow": True})], {"xpassed": (1,)}),
13871387
(
1388-
"green",
1388+
"yellow",
13891389
[
1390-
("1 passed", {"bold": True, "green": True}),
1391-
("1 xpassed", {"bold": False, "yellow": True}),
1390+
("1 passed", {"bold": False, "green": True}),
1391+
("1 xpassed", {"bold": True, "yellow": True}),
13921392
],
13931393
{"xpassed": (1,), "passed": (1,)},
13941394
),

0 commit comments

Comments
 (0)