1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/ddf15d86a209/ Changeset: ddf15d86a209 User: hpk42 Date: 2016-02-11 17:05:32+00:00 Summary: Merged in nakatoio/tox (pull request #189)
Fix section substitution with {posargs} Affected #: 2 files diff -r bfe2e9b0a5ef459d4a57f695c6aa9e7cf0fa99a4 -r ddf15d86a2097e8d94fca572865fda556dca2623 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -274,6 +274,20 @@ ["echo", "cmd", "1", "2", "3", "4", "cmd", "2"], ] + def test_command_substitution_from_other_section_posargs(self, newconfig): + """Ensure subsitition from other section with posargs succeeds""" + config = newconfig(""" + [section] + key = thing {posargs} arg2 + [testenv] + commands = + {[section]key} + """) + reader = SectionReader("testenv", config._cfg) + reader.addsubstitutions([r"argpos"]) + x = reader.getargvlist("commands") + assert x == [['thing', 'argpos', 'arg2']] + def test_command_env_substitution(self, newconfig): """Ensure referenced {env:key:default} values are substituted correctly.""" config = newconfig(""" diff -r bfe2e9b0a5ef459d4a57f695c6aa9e7cf0fa99a4 -r ddf15d86a2097e8d94fca572865fda556dca2623 tox/config.py --- a/tox/config.py +++ b/tox/config.py @@ -1094,7 +1094,7 @@ current_command += line if is_section_substitution(current_command): - replaced = reader._replace(current_command) + replaced = reader._replace(current_command, crossonly=True) commands.extend(cls.getargvlist(reader, replaced)) else: commands.append(cls.processcommand(reader, current_command)) 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