[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Removing bold formatting from test results with --no-color
commit 063ce0bd893bca006b13b8781740924b560cb79e
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed Mar 21 09:24:17 2012 -0700
Removing bold formatting from test results with --no-color
The --no-color argument should remove all ANSI escape formatting but it just
removed color. As a result the test result text (such as "[SUCCESS]") was still
bold. Caught and fixed by gsathya.
---
test/output.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/test/output.py b/test/output.py
index 7a69fac..83a3a80 100644
--- a/test/output.py
+++ b/test/output.py
@@ -153,7 +153,10 @@ def align_results(line_type, line_content):
assert False, "Unexpected line type: %s" % line_type
return line_content
- return "%-61s[%s]" % (line_content, term.format(new_ending, term.Attr.BOLD))
+ if CONFIG["argument.no_color"]:
+ return "%-61s[%s]" % (line_content, term.format(new_ending))
+ else:
+ return "%-61s[%s]" % (line_content, term.format(new_ending, term.Attr.BOLD))
class ErrorTracker:
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits