Add test environment configurations to support tox
Change-Id: I6c40cf28f9e860036c185a4e6faeb95018ae2fbe
This commit is contained in:
parent
1da12a51c1
commit
edf7533b8c
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,7 +28,7 @@ pip-log.txt
|
|||||||
.coverage
|
.coverage
|
||||||
.tox
|
.tox
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
|
.testrepository
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
|
||||||
|
4
.testr.conf
Normal file
4
.testr.conf
Normal file
@ -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
|
@ -1,3 +1,4 @@
|
|||||||
discover
|
discover
|
||||||
mock
|
mock
|
||||||
unittest2
|
unittest2
|
||||||
|
testrepository>=0.0.17
|
||||||
|
34
tox.ini
34
tox.ini
@ -1,10 +1,36 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
envlist = py27
|
skipsdist = True
|
||||||
|
envlist = py26,py27,pep8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
LANGUAGE=en_US:en
|
||||||
|
LC_ALL=C
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
install_command = pip install -U {opts} {packages}
|
||||||
{envpython} -m unittest discover
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user