2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/790d8f87af00/ Changeset: 790d8f87af00 User: hpk42 Date: 2015-04-28 10:20:07+00:00 Summary: fix issue240: allow to specify empty argument list without it being rewritten to ".". Thanks Daniel Hahler. Affected #: 3 files
diff -r 9383b904df1808de2e546000e49f8231c2f94f79 -r 790d8f87af00c7caf12c72376459f8607a06752d CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,9 @@ - tox has now somewhat pep8 clean code, thanks to Volodymyr Vitvitski. +- fix issue240: allow to specify empty argument list without it being + rewritten to ".". Thanks Daniel Hahler. + 1.9.2 ----------- diff -r 9383b904df1808de2e546000e49f8231c2f94f79 -r 790d8f87af00c7caf12c72376459f8607a06752d tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -863,6 +863,15 @@ assert argv[0] == ["cmd1", "[hello]", "world"] assert argv[1] == ["cmd1", "brave", "new", "world"] + def test_substitution_noargs_issue240(self, newconfig): + inisource = """ + [testenv] + commands = echo {posargs:foo} + """ + conf = newconfig([""], inisource).envconfigs['python'] + argv = conf.commands + assert argv[0] == ["echo"] + def test_posargs_backslashed_or_quoted(self, tmpdir, newconfig): inisource = """ [testenv:py24] diff -r 9383b904df1808de2e546000e49f8231c2f94f79 -r 790d8f87af00c7caf12c72376459f8607a06752d tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -373,9 +373,10 @@ if vc.args_are_paths: args = [] for arg in config.option.args: - origpath = config.invocationcwd.join(arg, abs=True) - if origpath.check(): - arg = vc.changedir.bestrelpath(origpath) + if arg: + origpath = config.invocationcwd.join(arg, abs=True) + if origpath.check(): + arg = vc.changedir.bestrelpath(origpath) args.append(arg) reader.addsubstitutions(args) setenv = {} https://bitbucket.org/hpk42/tox/commits/273d12589a25/ Changeset: 273d12589a25 User: hpk42 Date: 2015-04-28 10:21:19+00:00 Summary: merge Affected #: 1 file diff -r 790d8f87af00c7caf12c72376459f8607a06752d -r 273d12589a2548f4a0603da9d82ade8a284d4196 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -92,7 +92,9 @@ "test command found but not installed in testenv\n" " cmd: %s\n" " env: %s\n" - "Maybe forgot to specify a dependency?" % (p, self.envconfig.envdir)) + "Maybe you forgot to specify a dependency? " + "See also the whitelist_externals envconfig setting." % ( + p, self.envconfig.envdir)) return str(p) # will not be rewritten for reporting def is_allowed_external(self, p): 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