[tox] don't pass {posargs} to coverage in 'htmlcov' env

The {posargs} are global for the current tox process, and we already use them to pass additional arguments to the pytest command in the default testenv, so we can't at the same time also use them to pass options to coverage.py.

The 'htmlcov' tox environment produces the combined coverage.py report, and store it in htmlcov/index.html; this is listed in the tox.ini 'envlist', so it is run by default at every 'tox' invocation, when no explicit env list is passed via either -e option or $TOXENV variable.

The options to `coverage html` are not much interesting anyway; it's much more useful being able to, e.g., run tox for specific tests matching a string or expression:

$ tox -- -k "feaLib"
This commit is contained in:
Cosimo Lupo 2017-04-10 12:23:12 +01:00
parent 7fe876a803
commit e5e795ac9f
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -29,7 +29,7 @@ deps =
skip_install = true
commands =
coverage combine
coverage html {posargs}
coverage html
[testenv:codecov]
passenv = *