aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJacob P. Fickes <jacobpfickes@gmail.com>2022-04-06 17:44:07 -0400
committerJacob P. Fickes <jacobpfickes@gmail.com>2022-04-07 12:17:01 -0400
commit3258bad996262792ba77573d6080dafa3952929c (patch)
tree096bfbb51eff6b5905515971af212c92ae59b912 /test
parent15220ec9039ac330dbc6fd53fa06424cde04d0b6 (diff)
downloadbitcoin-3258bad996262792ba77573d6080dafa3952929c.tar.xz
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)
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/test_runner.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 381d2b9426..2178d5868c 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -28,7 +28,7 @@ import logging
import unittest
# Formatting. Default colors to empty strings.
-BOLD, GREEN, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "")
+DEFAULT, BOLD, GREEN, RED = ("", ""), ("", ""), ("", ""), ("", "")
try:
# Make sure python thinks it can write unicode to its stdout
"\u2713".encode("utf_8").decode(sys.stdout.encoding)
@@ -59,10 +59,10 @@ if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
kernel32.SetConsoleMode(stderr, stderr_mode.value | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
# primitive formatting on supported
# terminal via ANSI escape sequences:
+ DEFAULT = ('\033[0m', '\033[0m')
BOLD = ('\033[0m', '\033[1m')
GREEN = ('\033[0m', '\033[0;32m')
RED = ('\033[0m', '\033[0;31m')
- GREY = ('\033[0m', '\033[1;30m')
TEST_EXIT_PASSED = 0
TEST_EXIT_SKIPPED = 77
@@ -366,11 +366,11 @@ def main():
args, unknown_args = parser.parse_known_args()
if not args.ansi:
- global BOLD, GREEN, RED, GREY
+ global DEFAULT, BOLD, GREEN, RED
+ DEFAULT = ("", "")
BOLD = ("", "")
GREEN = ("", "")
RED = ("", "")
- GREY = ("", "")
# args to be passed on always start with two dashes; tests are the remaining unknown args
tests = [arg for arg in unknown_args if arg[:2] != "--"]
@@ -714,7 +714,7 @@ class TestResult():
color = RED
glyph = CROSS
elif self.status == "Skipped":
- color = GREY
+ color = DEFAULT
glyph = CIRCLE
return color[1] + "%s | %s%s | %s s\n" % (self.name.ljust(self.padding), glyph, self.status.ljust(7), self.time) + color[0]