February 2022
Intermediate to advanced
274 pages
6h 28m
English
Let’s extend envlist in tox.ini to add more Python versions:
| | [tox] |
| | envlist = py37, py38, py39, py310 |
| | isolated_build = True |
| | skip_missing_interpreters = True |
Now we’ll be testing Python versions from 3.7 though 3.10.
We also added the setting, skip_missing_interpreters = True. If skip_missing_interpreters is set to False, the default, tox will fail if your system is missing any of the versions of Python listed. With it set to True, tox will run the tests on any available Python version, but skip versions it can’t find without failing.
The output is similar. This is an abbreviated output:
| | $ tox -c tox_multiple_pythons.ini |
| | ... |
| | py37 run-test: commands[0] ... |
Read now
Unlock full access