Colorize the coverage report
This commit is contained in:
parent
05732fa20e
commit
9472c8bc10
2 changed files with 20 additions and 1 deletions
12
termstr.py
12
termstr.py
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue