Fix branch checking in check_coverage.py.

This commit is contained in:
Florian Bruhin 2015-08-26 17:51:51 +02:00
parent fa8e207101
commit ae2ee68b85

View File

@ -112,7 +112,8 @@ def check_coverage():
assert '/' in filename, filename
# Files without any branches have 0% coverage
if branch_cov < 100 and klass.find('./lines/line[@branch="true"]'):
has_branches = klass.find('./lines/line[@branch="true"]') is not None
if branch_cov < 100 and has_branches:
is_bad = True
else:
is_bad = line_cov < 100