New issue 356: Feature proposal: add toxvars automatically to environment
https://bitbucket.org/hpk42/tox/issues/356/feature-proposal-add-toxvars-automatically
Oliver Bestwalter:
I am playing around with a test setup that includes lots of packages and I want
to unify testing between them. Instead of having lots of redundancy in the
tox.inis they would be kept simple and in sync by handling the details through
a script that can be maintained centrally.
For example: Instead of saying
`unittests: py.test --junitxml={posargs:{toxworkdir}}/{envname}.xml
--cov-config tests/settings/.coveragerc --cov --cov-report html tests/unit`
in tons of tox.inis, it would be (using a script called e.g. runtests that
deals with the details):
`unittests: runtests unit`
To make that work I would have to do
```
[testenv]
setenv =
TOX_ENVNAME = {envname}
; NOTE: using posargs like this crashes atm see #355
TOX_POSARGS = {posargs}
TOX_TOXINIDIR = {toxinidir}
TOX_TOXWORKDIR = {toxworkdir}
[...]
```
I was wondering what you think about enriching the environment automatically
with all values that are accessible in tox.ini via {value}?
you would do
```
[testenv]
addtoxvarstoenv = True
```
Or this could even be the default? That would add all of them in one fell
swoop. Naming convention could be like above `TOX_<name of value inside
tox.ini>`.
At the moment adding this would be blocked by #355.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit