Travis provides links to a few example projects that use different versions of python.
I'm a fan of the tornado one, as it shows how you can manage each version very explicitly.
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install unittest2; fi
Using this line, unittest2
will only install on the 2.x branch of Python. You can add further if/fi
statements to tune your installs for the Python 3.x branch.