diff options
| author | Chris Rose <offby1@offby1.net> | 2011-07-19 22:52:06 -0700 |
|---|---|---|
| committer | Chris Rose <offby1@offby1.net> | 2011-07-19 22:52:06 -0700 |
| commit | 7cb6f265883f044a22b8e0cc45f5c9abd89527cf (patch) | |
| tree | ee7d950dc1fe2da6aca51ce371052b76b58f4ab8 | |
| parent | a168c15f808f64a570c0b482d27963a6de56e5d7 (diff) | |
| download | tox-7cb6f265883f044a22b8e0cc45f5c9abd89527cf.tar.gz | |
Add a test for bare {posargs} substitution
| -rw-r--r-- | tests/test_config.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 8811554..bc988f2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -460,6 +460,26 @@ class TestConfigTestEnv: argv = conf.commands assert argv[0] == ["cmd1", "hello"] + def test_rewrite_simple_posargs(self, tmpdir, newconfig): + inisource = """ + [testenv:py24] + args_are_paths = True + changedir = tests + commands = cmd1 {posargs} + """ + conf = newconfig([], inisource).envconfigs['py24'] + argv = conf.commands + assert argv[0] == ["cmd1"] + + conf = newconfig(["tests/hello"], inisource).envconfigs['py24'] + argv = conf.commands + assert argv[0] == ["cmd1", "tests/hello"] + + tmpdir.ensure("tests", "hello") + conf = newconfig(["tests/hello"], inisource).envconfigs['py24'] + argv = conf.commands + assert argv[0] == ["cmd1", "hello"] + class TestGlobalOptions: def test_notest(self, newconfig): config = newconfig([], "") |
