[TIP] tox "empty" factors for generated environment?

Barry Warsaw barry at python.org
Sat Jan 30 13:33:22 PST 2016


On Jan 30, 2016, at 09:33 AM, holger krekel wrote:

>Not sure.  I guess we could think again about negation, i.e. that
>
>    coverage: ...
>    !coverage: ...
>
>so that "!coverage" means "is not an existing factor in the env".

I think that could work.  For example, I might have different dependencies for
the negated factor:

[testenv]
    deps =
        pg: psycopg2
        !pg: sqlite3

>Would this be helpful in your case?  do you think it's a good new unambigous
>syntax?

I do, but I'm still unsure how I'd write the [tox]envlist for a negation
factor.  As it turns out, e.g. in Mailman I'd have two factors and one
negation, so maybe something like:

[tox]
envlist = {py34,py35}-{!,coverage}-{!,pg}

Then:

$ tox -e py34,py35
$ tox -e py35-coverage
$ tox -e py34-coverage-pg

would all be valid.  Does that make sense?

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/20160130/98c82297/attachment.pgp>


More information about the testing-in-python mailing list