|
|
@ -46,10 +46,9 @@ class Devnull(object):
|
|
|
|
def get_total(report):
|
|
|
|
def get_total(report):
|
|
|
|
doc = BeautifulSoup(file(report), 'xml')
|
|
|
|
doc = BeautifulSoup(file(report), 'xml')
|
|
|
|
tag = doc.select("report > counter[type^INST]")[0]
|
|
|
|
tag = doc.select("report > counter[type^INST]")[0]
|
|
|
|
missed = int(tag['missed'])
|
|
|
|
missed = float(tag['missed'])
|
|
|
|
covered = int(tag['covered'])
|
|
|
|
covered = float(tag['covered'])
|
|
|
|
total = int((covered * 10000 / (missed + covered)) / 100)
|
|
|
|
return str(int(round(100 * covered / (missed + covered))))
|
|
|
|
return str(total)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_color(total):
|
|
|
|
def get_color(total):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|