parent
df3733af54
commit
0c6574afb1
@ -272,14 +272,14 @@ def main_check_all():
|
|||||||
This makes sure the files have 100% coverage without running unrelated
|
This makes sure the files have 100% coverage without running unrelated
|
||||||
tests.
|
tests.
|
||||||
|
|
||||||
This runs py.test with the used executable, so check_coverage.py should be
|
This runs pytest with the used executable, so check_coverage.py should be
|
||||||
called with something like ./.tox/py34/bin/python.
|
called with something like ./.tox/py34/bin/python.
|
||||||
"""
|
"""
|
||||||
for test_file, src_file in PERFECT_FILES:
|
for test_file, src_file in PERFECT_FILES:
|
||||||
if test_file is None:
|
if test_file is None:
|
||||||
continue
|
continue
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
[sys.executable, '-m', 'py.test', '--cov', 'qutebrowser',
|
[sys.executable, '-m', 'pytest', '--cov', 'qutebrowser',
|
||||||
'--cov-report', 'xml', test_file])
|
'--cov-report', 'xml', test_file])
|
||||||
with open('coverage.xml', encoding='utf-8') as f:
|
with open('coverage.xml', encoding='utf-8') as f:
|
||||||
messages = check(f, [(test_file, src_file)])
|
messages = check(f, [(test_file, src_file)])
|
||||||
|
@ -86,8 +86,8 @@ def pytest_collection_modifyitems(items):
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
py.test -m "not gui" # run all tests except gui tests
|
pytest -m "not gui" # run all tests except gui tests
|
||||||
py.test -m "gui" # run only gui tests
|
pytest -m "gui" # run only gui tests
|
||||||
|
|
||||||
It also handles the platform specific markers by translating them to skipif
|
It also handles the platform specific markers by translating them to skipif
|
||||||
markers.
|
markers.
|
||||||
|
Loading…
Reference in New Issue
Block a user