diff options
author | holger krekel <holger@merlinux.eu> | 2015-11-13 10:48:43 +0100 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2015-11-13 10:48:43 +0100 |
commit | d204cac6983b2216bc423c8b67df7a8af3471464 (patch) | |
tree | b548045c5e515c67d9776f182c2baf590d88aa0e /tests/test_config.py | |
parent | 616b85457ba1781c9b5e33ff17964eb03a7a404b (diff) | |
download | tox-d204cac6983b2216bc423c8b67df7a8af3471464.tar.gz |
add various xfailing test cases for env substitution in setenv
Diffstat (limited to 'tests/test_config.py')
-rw-r--r-- | tests/test_config.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 61047c1..44c6e7d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1598,6 +1598,47 @@ class TestHashseedOption: self._check_hashseed(envconfigs["hash2"], '123456789') +class TestSetenv: + @pytest.mark.xfail(reason="fix pending") + def test_setenv_uses_os_environ(self, tmpdir, newconfig, monkeypatch): + monkeypatch.setenv("X", "1") + config = newconfig(""" + [testenv:env1] + setenv = + X = {env:X} + """) + assert config.envconfigs["env1"].setenv["X"] == "1" + + @pytest.mark.xfail(reason="fix pending") + def test_setenv_default_os_environ(self, tmpdir, newconfig, monkeypatch): + monkeypatch.delenv("X", raising=False) + config = newconfig(""" + [testenv:env1] + setenv = + X = {env:X:2} + """) + assert config.envconfigs["env1"].setenv["X"] == "2" + + @pytest.mark.xfail(reason="fix pending") + def test_setenv_uses_other_setenv(self, tmpdir, newconfig): + config = newconfig(""" + [testenv:env1] + setenv = + Y = 5 + X = {env:Y} + """) + assert config.envconfigs["env1"].setenv["X"] == "5" + + @pytest.mark.xfail(reason="fix pending") + def test_setenv_recursive_direct(self, tmpdir, newconfig): + config = newconfig(""" + [testenv:env1] + setenv = + X = {env:X:3} + """) + assert config.envconfigs["env1"].setenv["X"] == "3" + + class TestIndexServer: def test_indexserver(self, tmpdir, newconfig): config = newconfig(""" |