[tox] call pytest without --pyargs option

Previously, we were using --pyargs to make sure pytest would run the test suite against the installed package, because our tests
were embedded inside the package and hence importable.

Now that they are placed in an external folder, that option is not needed.
pytest without options will run all the test modules from the default test paths as defined in setup.cfg, i.e Tests/ folder.

The tests will be run against the installed fontTools in the current tox environment.

We also pass {posargs} in the 'htmlcov' tox env, to allow passing extra options after `tox -e htmlcov -- {posargs}` to the `coverage html` command.
This commit is contained in:
Cosimo Lupo 2017-01-15 22:04:39 +00:00
parent cee2fdfccc
commit 6a6efc7877
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -19,8 +19,8 @@ commands =
# We use parallel mode and then combine later so that coverage.py will take # We use parallel mode and then combine later so that coverage.py will take
# paths like .tox/py36/lib/python3.6/site-packages/fontTools and collapse # paths like .tox/py36/lib/python3.6/site-packages/fontTools and collapse
# them into Lib/fontTools. # them into Lib/fontTools.
cov: coverage run --parallel-mode -m pytest {posargs:--pyargs fontTools} cov: coverage run --parallel-mode -m pytest {posargs}
nocov: pytest {posargs:--pyargs fontTools} nocov: pytest {posargs}
[testenv:htmlcov] [testenv:htmlcov]
basepython = {env:TOXPYTHON:python3.5} basepython = {env:TOXPYTHON:python3.5}
@ -29,7 +29,7 @@ deps =
skip_install = true skip_install = true
commands = commands =
coverage combine coverage combine
coverage html coverage html {posargs}
[testenv:codecov] [testenv:codecov]
passenv = * passenv = *