Skip to content

Commit 3258bad

Browse files
committed
changes color of skipped functional tests
Changes the color of skipped functional tests to the default text color of the terminal. This will make skipped tests easy to read on the majority of background colors rather than the original grey color (hard to read on dark backgrounds) and the proposed yellow change (hard to read on white backgrounds)
1 parent 15220ec commit 3258bad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/functional/test_runner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import unittest
2929

3030
# Formatting. Default colors to empty strings.
31-
BOLD, GREEN, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "")
31+
DEFAULT, BOLD, GREEN, RED = ("", ""), ("", ""), ("", ""), ("", "")
3232
try:
3333
# Make sure python thinks it can write unicode to its stdout
3434
"\u2713".encode("utf_8").decode(sys.stdout.encoding)
@@ -59,10 +59,10 @@
5959
kernel32.SetConsoleMode(stderr, stderr_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
6060
# primitive formatting on supported
6161
# terminal via ANSI escape sequences:
62+
DEFAULT = ('\033[0m', '\033[0m')
6263
BOLD = ('\033[0m', '\033[1m')
6364
GREEN = ('\033[0m', '\033[0;32m')
6465
RED = ('\033[0m', '\033[0;31m')
65-
GREY = ('\033[0m', '\033[1;30m')
6666

6767
TEST_EXIT_PASSED = 0
6868
TEST_EXIT_SKIPPED = 77
@@ -366,11 +366,11 @@ def main():
366366

367367
args, unknown_args = parser.parse_known_args()
368368
if not args.ansi:
369-
global BOLD, GREEN, RED, GREY
369+
global DEFAULT, BOLD, GREEN, RED
370+
DEFAULT = ("", "")
370371
BOLD = ("", "")
371372
GREEN = ("", "")
372373
RED = ("", "")
373-
GREY = ("", "")
374374

375375
# args to be passed on always start with two dashes; tests are the remaining unknown args
376376
tests = [arg for arg in unknown_args if arg[:2] != "--"]
@@ -714,7 +714,7 @@ def __repr__(self):
714714
color = RED
715715
glyph = CROSS
716716
elif self.status == "Skipped":
717-
color = GREY
717+
color = DEFAULT
718718
glyph = CIRCLE
719719

720720
return color[1] + "%s | %s%s | %s s\n" % (self.name.ljust(self.padding), glyph, self.status.ljust(7), self.time) + color[0]

0 commit comments

Comments
 (0)