Mercurial > bitten > bitten-test
changeset 608:3e018dcb1b91
0.6dev: Minor issue with `python:trace` where percentage was calculated based on covered lines as read from .cover file divided by code line count as read by `bitten.util.loc`. They obviously count code lines with some minor differences.
Fixes #405.
author | osimons |
---|---|
date | Fri, 31 Jul 2009 22:40:20 +0000 |
parents | 5d396356bf7a |
children | 022bcceb90b7 |
files | bitten/build/pythontools.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/build/pythontools.py +++ b/bitten/build/pythontools.py @@ -301,7 +301,8 @@ elem.append(xmlio.Element('line_hits')[' '.join(lines)]) - num_lines = len(code_lines) + num_lines = not lines and len(code_lines) or \ + len([l for l in lines if l != '-']) if num_lines: percentage = int(round(num_covered * 100 / num_lines)) else: