Replace py.test with pytest

See #1877
This commit is contained in:
Florian Bruhin 2016-08-22 07:41:10 +02:00
parent df3733af54
commit 0c6574afb1
2 changed files with 4 additions and 4 deletions

View File

@ -272,14 +272,14 @@ def main_check_all():
This makes sure the files have 100% coverage without running unrelated
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.
"""
for test_file, src_file in PERFECT_FILES:
if test_file is None:
continue
subprocess.check_call(
[sys.executable, '-m', 'py.test', '--cov', 'qutebrowser',
[sys.executable, '-m', 'pytest', '--cov', 'qutebrowser',
'--cov-report', 'xml', test_file])
with open('coverage.xml', encoding='utf-8') as f:
messages = check(f, [(test_file, src_file)])

View File

@ -86,8 +86,8 @@ def pytest_collection_modifyitems(items):
For example:
py.test -m "not gui" # run all tests except gui tests
py.test -m "gui" # run only gui tests
pytest -m "not gui" # run all tests except gui tests
pytest -m "gui" # run only gui tests
It also handles the platform specific markers by translating them to skipif
markers.