diff options
author | holger krekel <holger@merlinux.eu> | 2015-06-19 11:37:08 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2015-06-19 11:37:08 +0200 |
commit | 519dfc099f43747518187151164f9cfcc1ef09a6 (patch) | |
tree | f26e00d59befd3454fd9b8fd0cd395676f8fe27e /tests | |
parent | 1d4d3b9433785bf397ef55c3f689a0b48a844c3f (diff) | |
download | tox-519dfc099f43747518187151164f9cfcc1ef09a6.tar.gz |
introduce a TOX_TESTENV_PASSENV setting which is honored
when constructing the set of environment variables for test environments.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 248f1d6..8aa7abd 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -789,6 +789,18 @@ class TestConfigTestEnv: assert "CB21" not in config.envconfigs["x2"].passenv assert "BX23" not in config.envconfigs["x2"].passenv + def test_passenv_from_global_env(self, tmpdir, newconfig, monkeypatch): + monkeypatch.setenv("A1", "a1") + monkeypatch.setenv("A2", "a2") + monkeypatch.setenv("TOX_TESTENV_PASSENV", "A1") + config = newconfig(""" + [testenv] + passenv = A2 + """) + env = config.envconfigs["python"] + assert "A1" in env.passenv + assert "A2" in env.passenv + def test_changedir_override(self, tmpdir, newconfig): config = newconfig(""" [testenv] |