Colorize the coverage report

This commit is contained in:
Andrew Hamilton 2015-12-23 18:21:58 +00:00
parent 05732fa20e
commit 9472c8bc10
2 changed files with 20 additions and 1 deletions

View file

@ -221,3 +221,15 @@ class TermStr(collections.UserString):
return CharStyle(style.fg_color, style.bg_color,
is_bold=style.is_bold, is_underlined=True)
return self.transform_style(make_underlined)
def fg_color(self, fg_color):
def set_fgcolor(style):
return CharStyle(fg_color, style.bg_color, is_bold=style.is_bold,
is_underlined=style.is_underlined)
return self.transform_style(set_fgcolor)
def bg_color(self, bg_color):
def set_bgcolor(style):
return CharStyle(style.fg_color, bg_color, is_bold=style.is_bold,
is_underlined=style.is_underlined)
return self.transform_style(set_bgcolor)