parent
1fd386e57e
commit
d805e2d71e
@ -23,7 +23,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from lxml import etree
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
os.pardir))
|
os.pardir))
|
||||||
@ -57,8 +57,8 @@ def main():
|
|||||||
assert os.path.exists(os.path.join(*path.split('/'))), path
|
assert os.path.exists(os.path.join(*path.split('/'))), path
|
||||||
|
|
||||||
with open('coverage.xml', encoding='utf-8') as f:
|
with open('coverage.xml', encoding='utf-8') as f:
|
||||||
tree = etree.parse(f) # pylint: disable=no-member
|
tree = ElementTree.parse(f)
|
||||||
classes = tree.xpath('/coverage/packages/package/classes/class')
|
classes = tree.getroot().findall('./packages/package/classes/class')
|
||||||
|
|
||||||
status = 0
|
status = 0
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ def main():
|
|||||||
assert 0 <= branch_cov <= 100, branch_cov
|
assert 0 <= branch_cov <= 100, branch_cov
|
||||||
assert '\\' not in filename, filename
|
assert '\\' not in filename, filename
|
||||||
|
|
||||||
if branch_cov < 100 and klass.xpath('lines/line[@branch="true"]'):
|
if branch_cov < 100 and klass.find('./lines/line[@branch="true"]'):
|
||||||
# Files without any branches have 0% coverage
|
# Files without any branches have 0% coverage
|
||||||
bad_branch_cov = True
|
bad_branch_cov = True
|
||||||
else:
|
else:
|
||||||
|
2
tox.ini
2
tox.ini
@ -61,7 +61,6 @@ deps =
|
|||||||
coverage==3.7.1
|
coverage==3.7.1
|
||||||
pytest-cov==1.8.1
|
pytest-cov==1.8.1
|
||||||
cov-core==1.15.0
|
cov-core==1.15.0
|
||||||
lxml==3.4.4
|
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} -m py.test --strict -rfEswx -v --cov qutebrowser --cov-report term --cov-report html --cov-report xml {posargs:tests}
|
{envpython} -m py.test --strict -rfEswx -v --cov qutebrowser --cov-report term --cov-report html --cov-report xml {posargs:tests}
|
||||||
@ -83,7 +82,6 @@ deps =
|
|||||||
pylint==1.4.4
|
pylint==1.4.4
|
||||||
logilab-common==1.0.2
|
logilab-common==1.0.2
|
||||||
six==1.9.0
|
six==1.9.0
|
||||||
lxml==3.4.4
|
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} -m pylint scripts qutebrowser --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
{envpython} -m pylint scripts qutebrowser --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
||||||
|
Loading…
Reference in New Issue
Block a user