Disabled color support for Windows
This commit is contained in:
parent
3ef747af6a
commit
623436a3cb
|
@ -67,7 +67,12 @@ class TimerPlugin(Plugin):
|
|||
self.timer_top_n = int(options.timer_top_n)
|
||||
self.timer_ok = self._parse_time(options.timer_ok)
|
||||
self.timer_warning = self._parse_time(options.timer_warning)
|
||||
self.timer_no_color = options.timer_no_color
|
||||
|
||||
# Windows + nosetests does not support colors (even with colorama).
|
||||
if os.name == 'nt':
|
||||
self.timer_no_color = True
|
||||
else:
|
||||
self.timer_no_color = options.timer_no_color
|
||||
|
||||
def startTest(self, test):
|
||||
"""Initializes a timer before starting a test."""
|
||||
|
@ -167,6 +172,8 @@ class TimerPlugin(Plugin):
|
|||
|
||||
_no_color_help = "Don't colorize output (useful for non-tty output)."
|
||||
|
||||
parser.add_option("--timer-no-color", action="store_true",
|
||||
default=False, dest="timer_no_color",
|
||||
help=_no_color_help)
|
||||
# Windows + nosetests does not support colors (even with colorama).
|
||||
if os.name != 'nt':
|
||||
parser.add_option("--timer-no-color", action="store_true",
|
||||
default=False, dest="timer_no_color",
|
||||
help=_no_color_help)
|
||||
|
|
Loading…
Reference in New Issue