I prefer to store most of the configuration in tox.ini and rely on it to install and run what should be running. For testing, I use pytest (the solution can be easily modified to use other test frameworks).
The following files are used:
tox.ini : automates verification.travis.yml : instructions for Travissetup.py : install a script to install the package for testingtest_requirements.txt : list of requirements for testing
tox.ini
[tox] envlist = py{26,27,33,34} [testenv] commands = py.test -sv tests [] deps = -rtest-requirements.txt
.travis.yml
sudo: false language: python python: - 2.6 - 2.7 - 3.3 - 3.4 install: - pip install tox-travis script: - tox
test_requirements.txt
Just a regular requirements file you will ever need (e.g. flake8 , pytest and other dependencies)
You can see the sample at https://github.com/vlcinsky/awslogs/tree/pbr-setup.py
The fact that he uses pbr , coverage and coverall there is not relevant to my answer (he works with or without pbr).
source share