[Pytest-commit] [hpk42/tox] tox 1.4.3 {[section]name} substitution does not work in general (issue #97)
Krisztian Fekete
issues-reply at bitbucket.org
Thu Apr 25 10:50:07 CEST 2013
New issue 97: tox 1.4.3 {[section]name} substitution does not work in general
https://bitbucket.org/hpk42/tox/issue/97/tox-143-section-name-substitution-does-not
Krisztian Fekete:
I am trying to reuse `tox.ini` with minimal changes between projects/packages - the only variation is in `deps` and the project/package name (see `package` section below). I want `commands` to be the same, so I tried to define an ini variable for package name and reference it from `commands` without success:
```
#!ini
[package]
name = whatever
deps =
# package specific dependencies
[tox]
envlist = py27
[testenv]
deps =
{[package]deps}
# needed by commands
nose
coverage
pep8
pyflakes
commands =
coverage erase
coverage run {envbindir}/nosetests
coverage report --show-missing --include={[package]name}/*
pyflakes {[package]name}
pep8 {[package]name}
```
I get `tox.ConfigError: ConfigError: substitution key '[package]name' not found` with this config.
It looks like the ini reading is restricted to known keys only (`{[package]deps}` in `[testenv]deps` works!), so it is currently not possible to introduce & reference new, unknown-to-tox, keys.
A potentially related issue is *#38 {[section]name} subsitution does not work for commands*
More information about the pytest-commit
mailing list