1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/c32a8d4463f5/ Changeset: c32a8d4463f5 User: hpk42 Date: 2014-09-23 14:04:03+00:00 Summary: fix issue188 make boolean config vars use the default if the config file specifies an empty string Affected #: 5 files
diff -r 413683ebbed09f1befde1219f3d02049b9818338 -r c32a8d4463f5f38036c7d86c25f2f51ffdc4bdd4 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,11 +3,13 @@ - new multi-dimensional configuration support. Many thanks to Alexander Schepanovski for the complete PR with docs. + And to Mike Bayer for filing an issue wrt to setting booleans. - fix issue148: remove "__PYVENV_LAUNCHER__" from os.environ when starting subprocesses. Thanks Steven Myint. + 1.7.2 ----------- diff -r 413683ebbed09f1befde1219f3d02049b9818338 -r c32a8d4463f5f38036c7d86c25f2f51ffdc4bdd4 setup.py --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.8.0.dev1', + version='1.8.0.dev2', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 413683ebbed09f1befde1219f3d02049b9818338 -r c32a8d4463f5f38036c7d86c25f2f51ffdc4bdd4 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -882,6 +882,21 @@ for name, config in configs.items(): assert config.basepython == 'python%s.%s' % (name[2], name[3]) + @pytest.mark.issue188 + def test_factors_in_boolean(self, newconfig): + inisource=""" + [tox] + envlist = py{27,33} + + [testenv] + recreate = + py27: True + """ + configs = newconfig([], inisource).envconfigs + assert configs["py27"].recreate + assert not configs["py33"].recreate + + class TestGlobalOptions: def test_notest(self, newconfig): config = newconfig([], "") diff -r 413683ebbed09f1befde1219f3d02049b9818338 -r c32a8d4463f5f38036c7d86c25f2f51ffdc4bdd4 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.8.0.dev1' +__version__ = '1.8.0.dev2' class exception: class Error(Exception): diff -r 413683ebbed09f1befde1219f3d02049b9818338 -r c32a8d4463f5f38036c7d86c25f2f51ffdc4bdd4 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -596,9 +596,12 @@ def getbool(self, section, name, default=None): s = self.getdefault(section, name, default) + if not s: + s = default if s is None: raise KeyError("no config value [%s] %s found" % ( section, name)) + if not isinstance(s, bool): if s.lower() == "true": s = True 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