diff options
| author | Andre Caron <andre.l.caron@gmail.com> | 2015-06-04 23:37:44 -0400 |
|---|---|---|
| committer | Andre Caron <andre.l.caron@gmail.com> | 2015-06-04 23:37:44 -0400 |
| commit | 435c0f3ce28a436fda2464c4200370c35b22c609 (patch) | |
| tree | 45054c6a6ab2a56eb8061e698d6975575605affc | |
| parent | d93963893137ad4d5a86fe22c9b05b364dc81143 (diff) | |
| download | tox-435c0f3ce28a436fda2464c4200370c35b22c609.tar.gz | |
Adds support for multiline envlist setting.
| -rw-r--r-- | tests/test_config.py | 11 | ||||
| -rw-r--r-- | tox/config.py | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 4522f87..3980df8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1273,6 +1273,17 @@ class TestGlobalOptions: assert config.envlist == \ ["py26-dep1", "py26-dep2", "py27-dep1", "py27-dep2"] + def test_envlist_multiline(self, newconfig): + inisource = """ + [tox] + envlist = + py27 + py34 + """ + config = newconfig([], inisource) + assert config.envlist == \ + ["py27", "py34"] + def test_minversion(self, tmpdir, newconfig, monkeypatch): inisource = """ [tox] diff --git a/tox/config.py b/tox/config.py index 42922e3..18919a3 100644 --- a/tox/config.py +++ b/tox/config.py @@ -731,6 +731,8 @@ class parseini: def _split_env(env): """if handed a list, action="append" was used for -e """ if not isinstance(env, list): + if '\n' in env: + env = ','.join(env.split('\n')) env = [env] return mapcat(_expand_envstr, env) |
