summaryrefslogtreecommitdiff
path: root/tests/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 372cd4f..ffc8343 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("""
@@ -1424,10 +1438,10 @@ class TestGlobalOptions:
def test_minversion(self, tmpdir, newconfig, monkeypatch):
inisource = """
[tox]
- minversion = 3.0
+ minversion = 10.0
"""
- config = newconfig([], inisource)
- assert config.minversion == "3.0"
+ with py.test.raises(tox.exception.MinVersionError):
+ config = newconfig([], inisource)
def test_skip_missing_interpreters_true(self, tmpdir, newconfig, monkeypatch):
inisource = """