diff options
author | Oliver Bestwalter <oliver@bestwalter.de> | 2016-06-20 15:22:16 +0200 |
---|---|---|
committer | Oliver Bestwalter <oliver@bestwalter.de> | 2016-06-20 15:22:16 +0200 |
commit | 6840bf25001b19fa6c3807589059ad6edd005d54 (patch) | |
tree | 7804dae120f91bb17042d842ada969d44ff29cb8 | |
parent | 26370885293487883eb60cbedcff76a0c6dc938e (diff) | |
parent | fc73a70a79ec5f5ce8bdba70dd73bd61555ea277 (diff) | |
download | tox-6840bf25001b19fa6c3807589059ad6edd005d54.tar.gz |
Merged in nakatoio/tox (pull request #190)
Process minversion before all else
-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 c54add9..59ab213 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -288,6 +288,20 @@ class TestIniParserAgainstCommandsKey: x = reader.getargvlist("commands") assert x == [['thing', 'argpos', 'arg2']] + def test_command_section_and_posargs_substitution(self, newconfig): + """Ensure subsitition from other section with posargs succeeds""" + config = newconfig(""" + [section] + key = thing arg1 + [testenv] + commands = + {[section]key} {posargs} endarg + """) + reader = SectionReader("testenv", config._cfg) + reader.addsubstitutions([r"argpos"]) + x = reader.getargvlist("commands") + assert x == [['thing', 'arg1', 'argpos', 'endarg']] + def test_command_env_substitution(self, newconfig): """Ensure referenced {env:key:default} values are substituted correctly.""" config = newconfig(""" |