diff options
author | Alexander Schepanovski <suor.web@gmail.com> | 2014-07-03 18:22:28 +0800 |
---|---|---|
committer | Alexander Schepanovski <suor.web@gmail.com> | 2014-07-03 18:22:28 +0800 |
commit | 39ef885258743032f2fef96746ffb6a88a24d92e (patch) | |
tree | 39fa827cdb521037f500c4034a664218411decc2 /tests | |
parent | 3130199a1c12c43634573271584320be904e7c97 (diff) | |
download | tox-git-39ef885258743032f2fef96746ffb6a88a24d92e.tar.gz |
Test factors and envlist expansion
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index ff743c4c..87ed36a7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -832,6 +832,24 @@ class TestConfigTestEnv: assert conf.changedir.basename == 'testing' assert conf.changedir.dirpath().realpath() == tmpdir.realpath() + def test_factors(self, newconfig): + inisource=""" + [tox] + envlist = a,b + + [testenv] + deps= + dep-all + a: dep-a + b: dep-b + !a: dep-not-a + """ + conf = newconfig([], inisource) + configs = conf.envconfigs + assert [dep.name for dep in configs['a'].deps] == ["dep-all", "dep-a"] + assert [dep.name for dep in configs['b'].deps] == \ + ["dep-all", "dep-b", "dep-not-a"] + class TestGlobalOptions: def test_notest(self, newconfig): config = newconfig([], "") @@ -935,6 +953,23 @@ class TestGlobalOptions: bp = "python%s.%s" %(name[2], name[3]) assert env.basepython == bp + def test_envlist_expansion(self, newconfig): + inisource = """ + [tox] + envlist = py{26,27},docs + """ + config = newconfig([], inisource) + assert config.envlist == ["py26", "py27", "docs"] + + def test_envlist_cross_product(self, newconfig): + inisource = """ + [tox] + envlist = py{26,27}-dep{1,2} + """ + config = newconfig([], inisource) + assert config.envlist == \ + ["py26-dep1", "py26-dep2", "py27-dep1", "py27-dep2"] + def test_minversion(self, tmpdir, newconfig, monkeypatch): inisource = """ [tox] |