1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/0c9bf47d235d/ Changeset: 0c9bf47d235d User: hpk42 Date: 2014-06-18 12:07:35 Summary: Merged in yunake/tox/missing_interpreter_config_option (pull request #111)
Add support for setting skip_missing_interpreters as a config option and not just a command line flag Affected #: 5 files diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 0c9bf47d235dc5ff021b3355e85f94fcd5095d41 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -7,7 +7,8 @@ resulting in a more refined behaviour in the 1.8 series. And thanks to Clark Boylan for the PR. -- fix issue59: add option "--skip-missing-interpreters" which won't fail the +- fix issue59: add a config variable ``skip-missing-interpreters`` as well as + command line option ``--skip-missing-interpreters`` which won't fail the build if Python interpreters listed in tox.ini are missing. Thanks Alexandre Conrad for PR104. diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 0c9bf47d235dc5ff021b3355e85f94fcd5095d41 CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -27,3 +27,4 @@ Morgan Fainberg Marc Schlaich Clark Boylan +Eugene Yunak diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 0c9bf47d235dc5ff021b3355e85f94fcd5095d41 doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -32,6 +32,18 @@ ... # override [tox] settings for the jenkins context # note: for jenkins distshare defaults to ``{toxworkdir}/distshare``. +.. confval:: skip_missing_interpreters=BOOL + + .. versionadded:: 1.7.2 + + Setting this to ``True`` is equivalent of passing the + ``--skip-missing-interpreters`` command line option, and will force ``tox`` to + return success even if some of the specified environments were missing. This is + useful for some CI systems or running on a developer box, where you might only + have a subset of all your supported interpreters installed but don't want to + mark the build as failed because of it. As expected, the command line switch + always overrides this setting if passed on the invokation. + **Default:** ``False`` envlist setting +++++++++++++++ diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 0c9bf47d235dc5ff021b3355e85f94fcd5095d41 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -943,6 +943,22 @@ config = newconfig([], inisource) assert config.minversion == "3.0" + def test_skip_missing_interpreters_true(self, tmpdir, newconfig, monkeypatch): + inisource = """ + [tox] + skip_missing_interpreters = True + """ + 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 -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 0c9bf47d235dc5ff021b3355e85f94fcd5095d41 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -239,6 +239,10 @@ "{toxinidir}/.tox") config.minversion = reader.getdefault(toxsection, "minversion", None) + if not config.option.skip_missing_interpreters: + config.option.skip_missing_interpreters = \ + reader.getbool(toxsection, "skip_missing_interpreters", False) + # determine indexserver dictionary config.indexserver = {'default': IndexServerConfig('default')} prefix = "indexserver" 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