[TIP] designing ways for tox to inherit dependencies and other parts of the environment configuration
Ronny Pfannschmidt
Ronny.Pfannschmidt at gmx.de
Tue Nov 1 14:03:39 PDT 2011
Hi,
since i got aware of quite a few people (including me)
that are unhappy with the need of repetition in tox environment
configurations,
we should come up with a good way to express commands/dependencies that
are common
the first way i came up with, is a simple inherit key, that is processed
before adding the data from the current section and adds dependency
items from a "base section"
with its help something like
------------------
[testenv]
commands=...
[testenv:foo-12]
deps=
pytest
pytest-cov
foo==1.2
[testenv:foo-13]
deps=
pytest
pytest-cov
foo==1.3
....
-----------------
can be reduced to
-----------------
[base:foo]
deps=
pytest
pytest-cov
[testenv]
commands=...
inherit=foo
[testenv:foo-12]
deps=foo==1.2
[testenc:foo-13]
deps=foo==1.3
...
-----------------
another idea is to have something like
-----------------
[depsets]
foo=
pytest
pytest-cov
[testenv]
depsets = foo
...
-----------------
I'm pretty sure there are still some conceptual issues in those
approaches, thus i want to have a discussion on how to proceed
i already implemented the first outlined approach as proof of concept
(without a way to debug the source of a dependency)
Regards,
Ronny Pfannschmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111101/97661371/attachment.pgp>
More information about the testing-in-python
mailing list