diff options
-rw-r--r-- | CHANGELOG | 6 | ||||
-rw-r--r-- | tests/test_config.py | 14 | ||||
-rw-r--r-- | tox/_config.py | 2 |
3 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,9 @@ +1.8.1.dev +----------- + +- fix issue190: allow setenv to be empty. + + 1.8.0 ----------- diff --git a/tests/test_config.py b/tests/test_config.py index efbbc80..bf74133 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -896,6 +896,20 @@ class TestConfigTestEnv: assert configs["py27"].recreate assert not configs["py33"].recreate + @pytest.mark.issue190 + def test_factors_in_setenv(self, newconfig): + inisource=""" + [tox] + envlist = py27,py26 + + [testenv] + setenv = + py27: X = 1 + """ + configs = newconfig([], inisource).envconfigs + assert configs["py27"].setenv["X"] == "1" + assert "X" not in configs["py26"].setenv + class TestGlobalOptions: def test_notest(self, newconfig): diff --git a/tox/_config.py b/tox/_config.py index d0f8c3e..3c1b8c2 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -526,6 +526,8 @@ class IniReader: value = {} for line in s.split(sep): + if not line.strip(): + continue name, rest = line.split('=', 1) value[name.strip()] = rest.strip() |