Skip to content

Commit bb92d83

Browse files
committed
[tests] Add unicode symbols for tests passing/failing/skipping
1 parent 63062bd commit bb92d83

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/functional/test_runner.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
291291
sys.exit(not all_passed)
292292

293293
def print_results(test_results, max_len_name, runtime):
294-
results = "\n" + BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "STATUS ", "DURATION") + BOLD[0]
294+
results = "\n" + BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "STATUS ", "DURATION") + BOLD[0]
295295

296296
test_results.sort(key=lambda result: result.name.lower())
297297
all_passed = True
@@ -384,7 +384,15 @@ def __repr__(self):
384384
elif self.status == "Skipped":
385385
COLOR = ('\033[0m', '\033[1;30m')
386386

387-
return COLOR[1] + "%s | %s | %s s\n" % (self.name.ljust(self.padding), self.status.ljust(7), self.time) + COLOR[0]
387+
SYMBOL = " "
388+
if self.status == "Passed":
389+
SYMBOL = "✓ "
390+
elif self.status == "Failed":
391+
SYMBOL = "✖ "
392+
elif self.status == "Skipped":
393+
SYMBOL = "○ "
394+
395+
return COLOR[1] + "%s | %s%s | %s s\n" % (self.name.ljust(self.padding), SYMBOL, self.status.ljust(7), self.time) + COLOR[0]
388396

389397

390398
def check_script_list(src_dir):

0 commit comments

Comments
 (0)