Reputation: 750
In the example below, the python version is 2.7.6.
Set up
$ tox --version
2.7.0 imported from /home/obk/anaconda3/lib/python3.6/site-packages/tox/__init__.py
$ ls
tox.ini
$ cat tox.ini
[tox]
envlist = py27
skipsdist = True
[testenv]
commands = python -V
Running it:
$ tox -r
py27 recreate: /home/obk/repos/test/.tox/py27
py27 installed:
py27 runtests: PYTHONHASHSEED='4191112007'
py27 runtests: commands[0] | python -V
Python 2.7.6
___________________________________ summary ___________________________________________
py27: commands succeeded
congratulations :)
The reason why I want the latest 2.7.15 is because my project has a dependency (my_foo
-> nbconvert
-> tornado
) that is now using ssl.create_default_context
which was added in 2.7.9.
Upvotes: 2
Views: 2838
Reputation: 57590
Why is it 2.7.6, and not the latest 2.7.15?
Because the version of Python 2.7 on your computer is 2.7.6.
How do I specify 2.7.15?
Specify basepython = /path/to/python2.7.15
under [testenv]
, where /path/to/python2.7.15
is a path to a local copy of exactly version 2.7.15.
Upvotes: 4