summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-06-19 11:37:08 +0200
committerholger krekel <holger@merlinux.eu>2015-06-19 11:37:08 +0200
commit519dfc099f43747518187151164f9cfcc1ef09a6 (patch)
treef26e00d59befd3454fd9b8fd0cd395676f8fe27e /tests
parent1d4d3b9433785bf397ef55c3f689a0b48a844c3f (diff)
downloadtox-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.py12
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]