Tox: option to skip a factor level

Created on 14 May 2018  路  7Comments  路  Source: tox-dev/tox

For example if {py27,py36}-{nocov,cov,diffcov}. @warsaw

In this case the user might want to not run all non diffcov envs.

new easy pr-merged

All 7 comments

A little more detail. In an example such as above, we generally run all the factors, however if we create an sdist, then unpack it and run tox in the unpacked directory, all -diffcov environments will fail. This is because diffcov only runs in a git repo (because it does diff comparisons against master). So when running in a non-git repository (e.g. an unpacked sdist), we want to skip all the diffcov environments.

@obestwalter @asottile @warsaw

Here's what I propose, what if the users could do fnmatch/regex filtering in env specification?

e.g. -e '.*-(nocov|diffcov)'

btw, this would conflict with passing a list of test env names (eg, tox -e isort,lint)

maybe have a separate env var for it then?

Maybe -re?

I would be even fine with having just an environment variable (TOX_ENV_FILTER). This is an advanced feature for advanced users I would believe.

@gaborbernat I think that would be good enough for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaraco picture jaraco  路  3Comments

pytoxbot picture pytoxbot  路  4Comments

pytoxbot picture pytoxbot  路  3Comments

obestwalter picture obestwalter  路  5Comments

obestwalter picture obestwalter  路  4Comments