diff --git a/.gitignore b/.gitignore index f5c93040..cd68f093 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ pip-log.txt .coverage .tox nosetests.xml - +.testrepository # Translations *.mo diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 00000000..0941a5ab --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./compass/tests $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index f91c5c73..d2a40fac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ discover mock unittest2 +testrepository>=0.0.17 diff --git a/tox.ini b/tox.ini index 1037a91e..5e1211f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,36 @@ [tox] minversion = 1.6 -envlist = py27 +skipsdist = True +envlist = py26,py27,pep8 [testenv] -usedevelop = True +setenv = VIRTUAL_ENV={envdir} + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = - {envpython} -m unittest discover +install_command = pip install -U {opts} {packages} +usedevelop = True +commands = python setup.py testr --slowest --testr-args='{posargs}' +distribute = false + +[testenv:pep8] +commands = flake8 +distribute = false + +[testenv:venv] +commands = {posargs} + +[testenv:cover] +commands = python setup.py testr --coverage --testr-args='{posargs}' + +[tox:jenkins] +downloadcache = ~/cache/pip + +[flake8] +ignore = E126,H703 +show-source = true +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools +