summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Yunak <eugene@yunak.eu>2014-06-18 12:53:27 +0300
committerEugene Yunak <eugene@yunak.eu>2014-06-18 12:53:27 +0300
commite9011ab3375632098a7d8877927b746b407c41e7 (patch)
tree8fe78b552fd2e3a143904cf7c531ab1d04c12c08
parent37947b687b27bd8e0a8921d22502629b240c6ecb (diff)
downloadtox-e9011ab3375632098a7d8877927b746b407c41e7.tar.gz
skip_missing_interpreters: fix bool handling and add appropriate test, thanks hpk42@ for the tip!
-rw-r--r--tests/test_config.py10
-rw-r--r--tox/_config.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 86f93e7..ff743c4 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -943,7 +943,7 @@ class TestGlobalOptions:
config = newconfig([], inisource)
assert config.minversion == "3.0"
- def test_skip_missing_interpreters(self, tmpdir, newconfig, monkeypatch):
+ def test_skip_missing_interpreters_true(self, tmpdir, newconfig, monkeypatch):
inisource = """
[tox]
skip_missing_interpreters = True
@@ -951,6 +951,14 @@ class TestGlobalOptions:
config = newconfig([], inisource)
assert config.option.skip_missing_interpreters
+ def test_skip_missing_interpreters_false(self, tmpdir, newconfig, monkeypatch):
+ inisource = """
+ [tox]
+ skip_missing_interpreters = False
+ """
+ config = newconfig([], inisource)
+ assert not config.option.skip_missing_interpreters
+
def test_defaultenv_commandline(self, tmpdir, newconfig, monkeypatch):
config = newconfig(["-epy24"], "")
env = config.envconfigs['py24']
diff --git a/tox/_config.py b/tox/_config.py
index 45d626a..4f89d00 100644
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -241,7 +241,7 @@ class parseini:
if not config.option.skip_missing_interpreters:
config.option.skip_missing_interpreters = \
- reader.getdefault(toxsection, "skip_missing_interpreters", None)
+ reader.getbool(toxsection, "skip_missing_interpreters", False)
# determine indexserver dictionary
config.indexserver = {'default': IndexServerConfig('default')}