diff options
author | holger krekel <holger@merlinux.eu> | 2014-10-12 17:21:32 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2014-10-12 17:21:32 +0200 |
commit | f0c0c9649ad003edd86d88ee267d53e34216213d (patch) | |
tree | d05ef0bf8de0eb0fb4bcd144d35ff76285b6b561 | |
parent | e6c99fa4b0a2056009b69144e3a8ed908e2ac053 (diff) | |
parent | f21eb4bba1e7d18b7718aeaadb9384dd74fcf8e6 (diff) | |
download | tox-f0c0c9649ad003edd86d88ee267d53e34216213d.tar.gz |
Merged in suor/tox/alex_gaynor/allow-in-factor-names-for-multidimensio-1411745805716 (pull request #124)
Finished "." in factor names pull-request
-rw-r--r-- | tests/test_config.py | 15 | ||||
-rw-r--r-- | tox/_config.py | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index bf74133..43b5a34 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -910,6 +910,21 @@ class TestConfigTestEnv: assert configs["py27"].setenv["X"] == "1" assert "X" not in configs["py26"].setenv + def test_period_in_factor(self, newconfig): + inisource=""" + [tox] + envlist = py27-{django1.6,django1.7} + + [testenv] + deps = + django1.6: Django==1.6 + django1.7: Django==1.7 + """ + configs = newconfig([], inisource).envconfigs + assert sorted(configs) == ["py27-django1.6", "py27-django1.7"] + assert [d.name for d in configs["py27-django1.6"].deps] \ + == ["Django==1.6"] + class TestGlobalOptions: def test_notest(self, newconfig): diff --git a/tox/_config.py b/tox/_config.py index 3c1b8c2..5d259c4 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -305,7 +305,7 @@ class parseini: factors = set() if section in self._cfg: for _, value in self._cfg[section].items(): - exprs = re.findall(r'^([\w{},-]+)\:\s+', value, re.M) + exprs = re.findall(r'^([\w{}\.,-]+)\:\s+', value, re.M) factors.update(*mapcat(_split_factor_expr, exprs)) return factors @@ -642,7 +642,7 @@ class IniReader: def _apply_factors(self, s): def factor_line(line): - m = re.search(r'^([\w{},-]+)\:\s+(.+)', line) + m = re.search(r'^([\w{}\.,-]+)\:\s+(.+)', line) if not m: return line |