From c1f6b4d0f1fffc7b53a9fbad607cad5e116e8332 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Fri, 15 May 2020 10:06:27 +0100 Subject: [PATCH] tox: add skip_missing_interpreters=true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://tox.readthedocs.io/en/latest/config.html#conf-skip_missing_interpreters Runing `tox` with no options runs the tests agaist all the python environments listed in the `tox.ini`'s `envlist` (currently 3.6, 3.7 and 3.8). Before this change, if any of these versions was not available, tox would exit with an error. Now it will simply continue (with a warning). This can be useful when on a developer box, one might only have a subset of all our supported interpreters installed but we don’t want to mark the build as failed because of it. Note that on the CI I am passing the opposite command line switch to override this setting, because there I want to make sure none of the specified interpreters is skipped. --- .travis/run.sh | 4 ++-- Doc/source/developer.rst | 6 +++--- tox.ini | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis/run.sh b/.travis/run.sh index ffb0ef79a..e947d8505 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -7,7 +7,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then source .venv/bin/activate fi -tox +tox --skip-missing-interpreters false # re-run all the XML-related tests, this time without lxml but using the # built-in ElementTree library. @@ -17,4 +17,4 @@ else # strip additional tox envs after the comma, add -nolxml factor TOXENV="${TOXENV%,*}-nolxml" fi -tox -e $TOXENV -- Tests/ufoLib Tests/misc/etree_test.py Tests/misc/plistlib_test.py +tox --skip-missing-interpreters false -e $TOXENV -- Tests/ufoLib Tests/misc/etree_test.py Tests/misc/plistlib_test.py diff --git a/Doc/source/developer.rst b/Doc/source/developer.rst index 0796eef7c..b4fb3f076 100644 --- a/Doc/source/developer.rst +++ b/Doc/source/developer.rst @@ -50,9 +50,9 @@ environments:: .. note:: - When you run ``tox`` without arguments, the tests are executed for all the environments listed in the ``tox.ini`` ``envlist``. The current Python interpreters defined for tox testing must be available on your system ``PATH``. + When you run ``tox`` without arguments, the tests are executed for all the environments listed in the ``tox.ini`` ``envlist``. The Python versions that are not available on your system ``PATH`` will be skipped. -You can specify a different testing environment list via the ``-e`` option, or the ``TOXENV`` environment variable:: +You can specify a specific testing environment list via the ``-e`` option, or the ``TOXENV`` environment variable:: tox -e py36 TOXENV="py36-cov,htmlcov" tox @@ -112,4 +112,4 @@ License :target: https://pypi.org/project/FontTools .. |Gitter Chat| image:: https://badges.gitter.im/fonttools-dev/Lobby.svg :alt: Join the chat at https://gitter.im/fonttools-dev/Lobby - :target: https://gitter.im/fonttools-dev/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge \ No newline at end of file + :target: https://gitter.im/fonttools-dev/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge diff --git a/tox.ini b/tox.ini index c160e8b4f..72763167a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] minversion = 3.0 envlist = py3{6,7,8}-cov, htmlcov +skip_missing_interpreters=true [testenv] setenv =