diff options
author | John Vandenberg <jayvdb@gmail.com> | 2015-12-26 16:22:49 +1100 |
---|---|---|
committer | John Vandenberg <jayvdb@gmail.com> | 2015-12-26 16:22:49 +1100 |
commit | fcc2506142ce6b0b3df29586c8f9ad6ac2a014b8 (patch) | |
tree | d17c1c35923678162931f8e4b41eddd2b9ea7039 | |
parent | deaacda2f7691916ff9fb703536b012d6d546208 (diff) | |
download | tox-fcc2506142ce6b0b3df29586c8f9ad6ac2a014b8.tar.gz |
Add test for double substitution using {{ }}
{{foo}} uses the result of {foo} as the name for substitution.
-rw-r--r-- | tests/test_config.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 6176641..a027e91 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1006,6 +1006,20 @@ class TestConfigTestEnv: argv = conf.commands assert argv[0] == ["echo"] + def test_substitution_double(self, newconfig): + inisource = """ + [params] + foo = bah + foo2 = [params]foo + + [testenv:py27] + commands = + echo {{[params]foo2}} + """ + conf = newconfig([], inisource).envconfigs['py27'] + argv = conf.commands + assert argv[0] == ['echo', 'bah'] + def test_posargs_backslashed_or_quoted(self, tmpdir, newconfig): inisource = """ [testenv:py27] |