Added tox.ini files to subprojects

It is much more convenient to use tox for
managing virtual environments.

Change-Id: Ic4c82fc68b3a0a7fa92fc301b78f6139b28b818b
Closes-Bug: 1321904
This commit is contained in:
Vladimir Kozhukalov 2014-06-06 17:52:06 +04:00
parent d6cd163afc
commit b7d72dffa1
4 changed files with 53 additions and 0 deletions

4
.testr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -s shotgun/test/ -p "*.py" $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
Fabric==1.7.0

5
test-requirements.txt Normal file
View File

@ -0,0 +1,5 @@
hacking>=0.8.0,<0.9
mock>=1.0
testrepository>=0.0.18
unittest2
discover

43
tox.ini Normal file
View File

@ -0,0 +1,43 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = py26,py27,pep8
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs:}'
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:pep8]
usedevelop = False
commands =
flake8 {posargs:shotgun}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage {posargs:shotgun}
[testenv:venv]
commands = {posargs:}
[testenv:devenv]
envdir = devenv
usedevelop = True
[flake8]
ignore = H234,H302,H802
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
show-pep8 = True
show-source = True
count = True
[hacking]
import_exceptions = testtools.matchers