4 new commits in tox: https://bitbucket.org/hpk42/tox/commits/356a12bcd0d7/ Changeset: 356a12bcd0d7 Branch: missing_interpreter_config_option User: yunake Date: 2014-06-18 11:09:13 Summary: 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 356a12bcd0d79355bfb7f73146e7d193dac0ea5f 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 356a12bcd0d79355bfb7f73146e7d193dac0ea5f CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -27,3 +27,4 @@ Morgan Fainberg Marc Schlaich Clark Boylan +Eugene Yunak diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 356a12bcd0d79355bfb7f73146e7d193dac0ea5f doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -22,6 +22,7 @@ distshare=path # defaults to {homedir}/.tox/distshare envlist=ENVLIST # defaults to the list of all environments skipsdist=BOOL # defaults to false + skip_missing_interpreters=BOOL # defaults to false ``tox`` autodetects if it is running in a Jenkins_ context @@ -32,6 +33,12 @@ ... # override [tox] settings for the jenkins context # note: for jenkins distshare defaults to ``{toxworkdir}/distshare``. +Setting ``skip_missing_interpreters`` 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. envlist setting +++++++++++++++ diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 356a12bcd0d79355bfb7f73146e7d193dac0ea5f tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -943,6 +943,14 @@ config = newconfig([], inisource) assert config.minversion == "3.0" + def test_skip_missing_interpreters(self, tmpdir, newconfig, monkeypatch): + inisource = """ + [tox] + skip_missing_interpreters = True + """ + config = newconfig([], inisource) + assert config.option.skip_missing_interpreters + def test_defaultenv_commandline(self, tmpdir, newconfig, monkeypatch): config = newconfig(["-epy24"], "") env = config.envconfigs['py24'] diff -r 7ca156d4acfd6044d65c6c50c9a064e89ad5b579 -r 356a12bcd0d79355bfb7f73146e7d193dac0ea5f 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.getdefault(toxsection, "skip_missing_interpreters", None) + # determine indexserver dictionary config.indexserver = {'default': IndexServerConfig('default')} prefix = "indexserver" https://bitbucket.org/hpk42/tox/commits/52f230a402da/ Changeset: 52f230a402da Branch: missing_interpreter_config_option User: yunake Date: 2014-06-18 11:53:27 Summary: skip_missing_interpreters: fix bool handling and add appropriate test, thanks hpk42@ for the tip! Affected #: 2 files diff -r 356a12bcd0d79355bfb7f73146e7d193dac0ea5f -r 52f230a402daf3dba2db2d65ed0268942b61014a tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -943,7 +943,7 @@ 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 @@ 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 356a12bcd0d79355bfb7f73146e7d193dac0ea5f -r 52f230a402daf3dba2db2d65ed0268942b61014a tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -241,7 +241,7 @@ 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')} https://bitbucket.org/hpk42/tox/commits/79dc2e679b3b/ Changeset: 79dc2e679b3b Branch: missing_interpreter_config_option User: yunake Date: 2014-06-18 12:03:34 Summary: skip_missing_interpreters: move documentation into a separate confval section Affected #: 1 file diff -r 52f230a402daf3dba2db2d65ed0268942b61014a -r 79dc2e679b3b20259c645f0715d1ef4554b44f3a doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -22,7 +22,6 @@ distshare=path # defaults to {homedir}/.tox/distshare envlist=ENVLIST # defaults to the list of all environments skipsdist=BOOL # defaults to false - skip_missing_interpreters=BOOL # defaults to false ``tox`` autodetects if it is running in a Jenkins_ context @@ -33,12 +32,18 @@ ... # override [tox] settings for the jenkins context # note: for jenkins distshare defaults to ``{toxworkdir}/distshare``. -Setting ``skip_missing_interpreters`` 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. +.. 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 +++++++++++++++ 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