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

holger krekel holger at merlinux.eu
Sun Jan 31 00:09:18 PST 2016


On Sat, Jan 30, 2016 at 16:33 -0500, Barry Warsaw wrote:
> 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}

What about today's possible ...

     envlist = {py34,py35}{,-coverage}{,-pg}

?  I guess it'd be nicer to make {py34,py35}-{,coverage}-{,pg} work as well.

best,
holger

> Then:
> 
> $ tox -e py34,py35
> $ tox -e py35-coverage
> $ tox -e py34-coverage-pg
> 
> would all be valid.  Does that make sense?
> 
> Cheers,
> -Barry



> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 
about me:    http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu



More information about the testing-in-python mailing list