diff options
author | holger krekel <holger@merlinux.eu> | 2015-04-28 12:21:19 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2015-04-28 12:21:19 +0200 |
commit | f2f06387a10c20ce0f657919540b137724c089f3 (patch) | |
tree | b0069a5c27a4d6401ccfa64cf9a511f68a6a156a | |
parent | b42e34580618704d70de6365c039391c403951f6 (diff) | |
parent | 93a94fc532955f0134b4535546af15871ef7dd65 (diff) | |
download | tox-f2f06387a10c20ce0f657919540b137724c089f3.tar.gz |
merge
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | tests/test_config.py | 9 | ||||
-rw-r--r-- | tox/_config.py | 7 |
3 files changed, 16 insertions, 3 deletions
@@ -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 --git a/tests/test_config.py b/tests/test_config.py index 0f271d7..79c98bd 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -863,6 +863,15 @@ class TestConfigTestEnv: 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 --git a/tox/_config.py b/tox/_config.py index afd2c55..4468d86 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -373,9 +373,10 @@ class parseini: 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 = {} |