New issue 222: setenv with generated environments require unwanted settings
https://bitbucket.org/hpk42/tox/issue/222/setenv-with-generated-environments-require

Barry Warsaw:

Here is a my tox.ini file:

```
[tox]
envlist = py27,py34,coverage-{py27,py34},fast-{py27,py34}
recreate = True

[coverage]
rcfile = {toxinidir}/{envname}.ini
rc = --rcfile={[coverage]rcfile}
dir = --directory={envname}
setenv =
    coverage: COVERAGE_PROCESS_START={[coverage]rcfile}
    coverage: COVERAGE_OPTIONS="-p"
    coverage: COVERAGE_FILE={toxinidir}/.coverage

[testenv]
commands =
    py27,py34: python -m nose2 -v
    coverage: python /usr/bin/python3-coverage run {[coverage]rc} -m nose2 -v
    coverage: python3-coverage combine {[coverage]rc}
    coverage: python3-coverage html {[coverage]rc} {[coverage]dir}
sitepackages = True
usedevelop = True
whitelist_externals = python3-coverage
setenv =
    fast: SKIP_SLOW_TESTS=1
    py34,py27: SKIP_SLOW_TESTS=0
```

Then:

```
% tox -l
py27
py34
coverage-py27
coverage-py34
fast-py27
fast-py34
```

However, if the line ```py34,py27: SKIP_SLOW_TESTS=0``` is omitted, then I get 
a traceback:

```
% tox -l
Traceback (most recent call last):
  File "/usr/bin/tox", line 9, in <module>
    load_entry_point('tox==1.8.0', 'console_scripts', 'tox')()
  File "/usr/lib/python3/dist-packages/tox/_cmdline.py", line 25, in main
    config = parseconfig(args, 'tox')
  File "/usr/lib/python3/dist-packages/tox/_config.py", line 42, in parseconfig
    parseini(config, inipath)
  File "/usr/lib/python3/dist-packages/tox/_config.py", line 296, in __init__
    self._makeenvconfig(name, section, reader._subs, config)
  File "/usr/lib/python3/dist-packages/tox/_config.py", line 354, in 
_makeenvconfig
    setenv.update(reader.getdict(section, 'setenv'))
  File "/usr/lib/python3/dist-packages/tox/_config.py", line 529, in getdict
    name, rest = line.split('=', 1)
ValueError: need more than 1 value to unpack
```


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to