[TIP] Tasting the Cheeseshop

Barry Warsaw barry at python.org
Thu Oct 20 10:36:45 PDT 2011


On Oct 18, 2011, at 05:55 AM, holger krekel wrote:

>I think it makes most sense to avoid relying on setup.py - with
>tox you can have "python setup.py test" as your test command which
>works fine.   If we want to test pypi packages that don't
>have a tox.ini (or setup.cfg) then we could try heuristics to
>create tox.ini files like "python setup.py test" and generate
>test environments based on the TROVE identifiers (python/python3).

Creating that set of heuristics is I think a bit tricky, but maybe we can do
something useful here.

One thing that would be helpful is if tox supported some kind of "stack" of
ini files.  For example, I might have a project with a tox.ini that looks like
this:

-----tox.ini
[tox]
envlist = py26,py27,py32,py33

[testenv]
commands=python setup.py test -vv

[testenv:py33]
# Python 3.3 isn't released yet, so use a local build from the hg branch.
basepython=/home/users/py33/bin/python3
-----tox.init

But on the test machine, testenv:py33 won't be appropriate and I might need to
add a testenv:py32 to pick up an unreleased patched version of Python 3.2.

Right now I've been thinking about just parsing the config file, merging it
with some "system settings" and then writing it back out again, but that's not
idea.  (Nor is what I currently do, which is punt if a tox.ini is found. ;)

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111020/1cd2fdf8/attachment.pgp>


More information about the testing-in-python mailing list