New issue 190: Generative setenv fails if there’s only one variable
https://bitbucket.org/hpk42/tox/issue/190/generative-setenv-fails-if-there-s-only
Hynek Schlawack:
Consider this minimal tox.ini:
```ini
[tox]
envlist = py27-{a,b}
[testenv]
deps =
b: pytest
setenv =
a: A = 1
commands = true
```
Running `tox -l` on it fails with
```
Traceback (most recent call last):
File "/Users/hynek/.local/bin/tox", line 9, in <module>
load_entry_point('tox==1.8.0', 'console_scripts', 'tox')()
File
"/Users/hynek/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py",
line 25, in main
config = parseconfig(args, 'tox')
File
"/Users/hynek/.local/venvs/tox/lib/python2.7/site-packages/tox/_config.py",
line 42, in parseconfig
parseini(config, inipath)
File
"/Users/hynek/.local/venvs/tox/lib/python2.7/site-packages/tox/_config.py",
line 296, in __init__
self._makeenvconfig(name, section, reader._subs, config)
File
"/Users/hynek/.local/venvs/tox/lib/python2.7/site-packages/tox/_config.py",
line 354, in _makeenvconfig
setenv.update(reader.getdict(section, 'setenv'))
File
"/Users/hynek/.local/venvs/tox/lib/python2.7/site-packages/tox/_config.py",
line 529, in getdict
name, rest = line.split('=', 1)
ValueError: need more than 1 value to unpack
```
while
```ini
[tox]
envlist = py27-{a,b}
[testenv]
setenv =
a: A = 1
b: B = 1
commands = true
```
and
```ini
[tox]
envlist = py27
[testenv]
setenv =
A = 1
commands = true
```
work just fine.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit