I am using python tox to run python unittest for several versions of python, but these python interpreters are not all available on all machines or platforms where I'm running tox.
How can I configure tox so it will run tests only when python interpretors are available.
Example of tox.ini
:
[tox]
envlist=py25,py27
[testenv]
...
[testenv:py25]
...
The big problem is that I do want to have a list of python environments which is auto-detected.
tox makes it easy to: Test against different versions of Python (which would have alerted Kyle that the library hadn't been tested against his install version). Test against different dependency versions. Capture and run setup steps/ad hoc commands (which Kyle could have made a mistake on / not known about)
A tox. ini file can be used to configure different types of packages, which is confusing at first because the tox home page suggests that tox is used to test your own packages you plan on distributing to PyPi.
As of Tox version 1.7.2, you can pass the --skip-missing-interpreters
flag to achieve this behavior. You can also set skip_missing_interpreters=true
in your tox.ini
file. More info here.
[tox]
envlist =
py24, py25, py26, py27, py30, py31, py32, py33, py34, jython, pypy, pypy3
skip_missing_interpreters =
true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With