[TIP] tox "empty" factors for generated environment?
Barry Warsaw
barry at python.org
Wed Jan 27 10:53:45 PST 2016
tox's generated environments are very cool. A question that sometimes comes
up is whether it's possible to include "empty" factors. Hopefully this makes
sense.
Let's say I want to define the following environments: py27 and py35 both for
the defaults and a coverage version. I could do something like:
[testenv:py27]
...
[testenv:py35]
...
[testenv:py27-coverage]
...
[testenv:py35-coverage]
...
I'd like to be able to use generated environments, e.g.
envlist = {py27,py35}{,-coverage}
but I don't think that's possible.
In that form it might not make sense because you'd have to define "" and
"-coverage" lines before the colon.
My current solution is to do something like:
envlist = {py27,py35}-{nocov,cov}
and then use the normal generated environments syntax. But I don't like
having to say something like `tox -e py35-nocov` when I want to run just that
environment.
Is there any way in which empty/default factors could be defined?
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160127/462b5250/attachment.pgp>
More information about the testing-in-python
mailing list