summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2014-09-25 15:43:21 +0200
committerholger krekel <holger@merlinux.eu>2014-09-25 15:43:21 +0200
commitf8a4a6218d4431b1a227f907685e88c5a3ad35a7 (patch)
treee9e887e8c06f401a58f199b87df203bc8ca0c170
parent5f16ba6fc7dc2d172373c8e1cdeeec553fe2b2e9 (diff)
downloadtox-f8a4a6218d4431b1a227f907685e88c5a3ad35a7.tar.gz
fix issue190: allow setenv to be empty
-rw-r--r--CHANGELOG6
-rw-r--r--tests/test_config.py14
-rw-r--r--tox/_config.py2
3 files changed, 22 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 62f2d3c..3e73166 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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()