Skip to content

Commit a245e52

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge 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 bitcoin#24791 ACKs for top commit: theStack: Tested ACK 3258bad jarolrod: Tested ACK bitcoin@3258bad Tree-SHA512: 3fe5ae0d3b4902b2b6bda6e89ab780feb8bf4b7cb1ce7e8467057b94a1e0a26ddeaf3cac0bc19b06ef10d8bccaac9c495029d42740fbedab8fb0d5fdd7d02eaf
1 parent bc6f304 commit a245e52

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

322322
args, unknown_args = parser.parse_known_args()
323323
if not args.ansi:
324-
global BOLD, GREEN, RED, GREY
324+
global DEFAULT, BOLD, GREEN, RED
325+
DEFAULT = ("", "")
325326
BOLD = ("", "")
326327
GREEN = ("", "")
327328
RED = ("", "")
328-
GREY = ("", "")
329329

330330
# args to be passed on always start with two dashes; tests are the remaining unknown args
331331
tests = [arg for arg in unknown_args if arg[:2] != "--"]
@@ -692,7 +692,7 @@ def __repr__(self):
692692
color = RED
693693
glyph = CROSS
694694
elif self.status == "Skipped":
695-
color = GREY
695+
color = DEFAULT
696696
glyph = CIRCLE
697697

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