[TIP] Fwd: finalizing tox's new parametrized configuration (RFC)
Carl Meyer
carl at oddbird.net
Fri Aug 8 08:58:57 PDT 2014
On 08/08/2014 08:55 AM, Alexander Schepanovski wrote:
>> Using the new syntax your tox.ini should collapse like this::
>>
>> [tox]
>> envlist = {py26,py27,py32,py33}-{1.4,1.5,1.6},
>> {py27,py32,py33}-trunk,
>> py27-1.5-nosouth
>>
>> [testenv]
>> deps =
>> coverage == 3.6
>> 1.4: Django == 1.4.10
>> 1.5: Django == 1.5.5
>> 1.6: https://github.com/django/django/tarball/stable/1.6.x
>> trunk: https://github.com/django/django/tarball/master
>> 1.4: South == 0.7.6
>> 1.5,1.6: South == 0.8.1
>>
>> commands = coverage run -a setup.py test
>
> There is one nuance here not covered: South==0.8.1 will be installed for
> py27-1.5-nosouth. To handle that one could change last deps line to:
>
> 1.5-!nosouth,1.6: South == 0.8.1
>
> (Neither AND with -, nor negation inside an expression are implemented yet)
>
> However, negation could lead to confusion I told about earlier, so we
> (me and Holger) are agreed to exclude it for now. Without using negation
> this could be written as:
>
> [tox]
> envlist = {py26,py27,py32,py33}-{1.4,1.5,1.6}-south,
> {py27,py32,py33}-trunk-south,
> py27-1.5-nosouth
>
> [testenv]
> deps =
> ...
> {1.5,1.6}-south: South == 0.8.1
Good catch. And this version seems unfortunate to me; I much prefer the
version with exclusion/negation. Personally I don't find something like
"1.5-!nosouth,1.6" confusing -- my first assumption would be that that
is negating the specific factor it precedes.
Carl
More information about the testing-in-python
mailing list