diff options
author | Alexander Schepanovski <suor.web@gmail.com> | 2014-10-12 23:10:19 +0800 |
---|---|---|
committer | Alexander Schepanovski <suor.web@gmail.com> | 2014-10-12 23:10:19 +0800 |
commit | be7b5dc748d7974a25b398548a1f72eaa44e8204 (patch) | |
tree | 4c561e51c6895268f235d7635df85cadff7a4017 | |
parent | 59c49a9bc604a65576663c14e08448938fa27eb7 (diff) | |
download | tox-git-be7b5dc748d7974a25b398548a1f72eaa44e8204.tar.gz |
Recognize period in envnames in factor conditions
--HG--
branch : alex_gaynor/allow-in-factor-names-for-multidimensio-1411745805716
-rw-r--r-- | tests/test_config.py | 15 | ||||
-rw-r--r-- | tox/_config.py | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 615de30b..43b5a34d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -909,14 +909,21 @@ class TestConfigTestEnv: configs = newconfig([], inisource).envconfigs 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} + [tox] + envlist = py27-{django1.6,django1.7} + + [testenv] + deps = + django1.6: Django==1.6 + django1.7: Django==1.7 """ configs = newconfig([], inisource).envconfigs - assert list(configs) == ["py27-django1.6", "py27-django-1.7"] + 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: diff --git a/tox/_config.py b/tox/_config.py index 5e8765b4..5d259c43 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -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 |