2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/73e3927b5098/ Changeset: 73e3927b5098 User: jayvdb Date: 2015-12-26 05:22:49+00:00 Summary: Add test for double substitution using {{ }}
{{foo}} uses the result of {foo} as the name for substitution. Affected #: 1 file diff -r 2d5d0e7584cc4cc35cc7e0519ce9610dd52b7a62 -r 73e3927b50983f57d6ec29c52daaa5ef2ce296b4 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1006,6 +1006,20 @@ 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] https://bitbucket.org/hpk42/tox/commits/73a25603c38b/ Changeset: 73a25603c38b User: hpk42 Date: 2016-06-20 16:17:41+00:00 Summary: Merged in jayvdb/tox (pull request #186) Add test for double substitution using {{ }} Affected #: 1 file diff -r bf8008c08c7361c18730c458032e875d97a97e90 -r 73a25603c38b7c171e956457dca52a41b44c3e3e tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1083,6 +1083,20 @@ 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] Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit