Skip to content

Commit ed4eeaf

Browse files
committed
Merge bitcoin/bitcoin#24793: test: Change color of skipped functional tests
3258bad changes color of skipped functional tests (Jacob P. Fickes) Pull request description: changes the color of skipped functional tests (currently grey and can be hard to read/invisible on dark backgrounds) to yellow. resolves #24791 ACKs for top commit: theStack: Tested ACK 3258bad jarolrod: Tested ACK bitcoin/bitcoin@3258bad Tree-SHA512: 3fe5ae0d3b4902b2b6bda6e89ab780feb8bf4b7cb1ce7e8467057b94a1e0a26ddeaf3cac0bc19b06ef10d8bccaac9c495029d42740fbedab8fb0d5fdd7d02eaf
2 parents fb7c12c + 3258bad commit ed4eeaf

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
@@ -372,11 +372,11 @@ def main():
372372

373373
args, unknown_args = parser.parse_known_args()
374374
if not args.ansi:
375-
global BOLD, GREEN, RED, GREY
375+
global DEFAULT, BOLD, GREEN, RED
376+
DEFAULT = ("", "")
376377
BOLD = ("", "")
377378
GREEN = ("", "")
378379
RED = ("", "")
379-
GREY = ("", "")
380380

381381
# args to be passed on always start with two dashes; tests are the remaining unknown args
382382
tests = [arg for arg in unknown_args if arg[:2] != "--"]
@@ -720,7 +720,7 @@ def __repr__(self):
720720
color = RED
721721
glyph = CROSS
722722
elif self.status == "Skipped":
723-
color = GREY
723+
color = DEFAULT
724724
glyph = CIRCLE
725725

726726
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)