Created
January 26, 2012 00:54
-
-
Save danverbraganza/1680113 to your computer and use it in GitHub Desktop.
My standard tox.ini file that allows you to run coverage, lettuce, nosetests and lint, and to pick out a given feature or a module for nosetest (So that you don't have to run the whole suite)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tox] | |
envlist=py27,lint | |
[testenv] | |
downloadcache={homedir}/.pipcache | |
distribute=True | |
sitepackages=False | |
[testenv:py27] | |
deps=nose | |
lettuce | |
coverage | |
mock | |
commands= | |
coverage erase | |
bash -c "test \"$(expr \"{posargs}\" : \".*\.feature\")\" -eq 0 && {envbindir}/coverage run {envbindir}/nosetests -w ./test/unit/ {posargs} || ( echo \"[TOX] Skipping nosetests\" && test \"$(expr \"{posargs}\" : \".*\.feature\")\" -ne 0 ) " | |
bash -c "test -z \"{posargs}\" -o `expr \"{posargs}\" : \".*\.feature\"` -ne 0 && {envbindir}/coverage run {envbindir}/lettuce ./test/features/{posargs} || ( echo \"[TOX] Skipping lettuce\" && test \"$(expr \"{posargs}\" : \".*\.feature\")\" -eq 0 ) " | |
coverage combine | |
coverage report --include=* -m | |
[testenv:lint] | |
basepython=python2.7 | |
deps=pylint | |
commands=pylint juicer2 --rcfile=pylint.rc | |
[testenv:docs] | |
basepython=python | |
changedir=doc | |
deps=sphinx | |
commands=sphinx-build -b html ./source ./html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment