[TIP] tox config format

Kumar McMillan kumar.mcmillan at gmail.com
Fri Jan 7 10:08:51 PST 2011


On Fri, Jan 7, 2011 at 8:47 AM, holger krekel <holger at merlinux.eu> wrote:
>    [testenv]
>    commands = python setup.py test
>    deps = django==1.2.3
>
>    [testenv:alpha1]
>    deps = http://www.djangoproject.com/download/1.3-alpha-1/tarball/

+1
I like this a lot!


fwiw, I think this kind of problem highlights where ini files fall
short and where Python configuration starts to have advantages.
However, as long as the custom ini syntax has extensive documentation
then I think it will be ok.  When the config file is in Python, a
developer knows what to do intuitively.  When it's a custom ini
syntax, she has to look it up in the docs.

As a point of reference, I believe Paste's custom ini syntax [1]
solves this problem like:

[testenv]
commands = python setup.py test
deps = django==1.2.3

[something_else]
inherits = testenv
deps = http://www.djangoproject.com/download/1.3-alpha-1/tarball/

...but I like testenv:something_else better because it seems more
logical at a glance.

[1] Or am I thinking of use=other ? something like that.
http://pythonpaste.org/deploy/#config-uris

>
>    [testenv:docs]
>    changedir = docs
>    deps =
>        sphinx
>    commands =
>        sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
>        sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees . {envtmpdir}/linkcheck
>
> makes sense to you?
>
> cheers,
> holger
>
>> All the best,
>>
>> Michael Foord
>>
>>> Alex
>>>
>>> --
>>> "I disapprove of what you say, but I will defend to the death your
>>> right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
>>> "The people's good is the highest law." -- Cicero
>>> "Code can always be simpler than you think, but never as simple as you
>>> want" -- Me
>>>
>>>
>>> _______________________________________________
>>> testing-in-python mailing list
>>> testing-in-python at lists.idyll.org
>>> http://lists.idyll.org/listinfo/testing-in-python
>>
>>
>> --
>>
>> http://www.voidspace.org.uk/
>>
>> May you do good and not evil
>> May you find forgiveness for yourself and forgive others
>> May you share freely, never taking more than you give.
>> -- the sqlite blessing http://www.sqlite.org/different.html
>>
>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>
>
> --
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>



More information about the testing-in-python mailing list