Support files for unit test of software-config hooks
This change adds a tox.ini file including environments for py26, py27 and pep8. These will be used to unit test the hot software-config hooks. Change-Id: Ieea12be77205d777a6b9c0f1c239418b9ce59d9f
This commit is contained in:
parent
89f2f7e0b0
commit
c393625dfa
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,2 +1,7 @@
|
|||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
*~
|
||||||
|
.tox
|
||||||
cfn/cloudformation-examples/
|
cfn/cloudformation-examples/
|
||||||
private
|
private
|
||||||
|
.testrepository
|
||||||
|
4
.testr.conf
Normal file
4
.testr.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_command=${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||||
|
test_id_option=--load-list $IDFILE
|
||||||
|
test_list_option=--list
|
0
requirements.txt
Normal file
0
requirements.txt
Normal file
14
test-requirements.txt
Normal file
14
test-requirements.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
coverage>=3.6
|
||||||
|
discover
|
||||||
|
fixtures>=0.3.14
|
||||||
|
# Hacking already pins down pep8, pyflakes and flake8
|
||||||
|
hacking>=0.8.0,<0.9
|
||||||
|
mock>=1.0
|
||||||
|
requests>=1.2.1,!=2.4.0
|
||||||
|
requests-mock>=0.4.0 # Apache-2.0
|
||||||
|
testrepository>=0.0.18
|
||||||
|
testscenarios>=0.4
|
||||||
|
testtools>=0.9.34
|
||||||
|
|
||||||
|
python-heatclient>=0.2.9
|
||||||
|
python-keystoneclient>=0.10.0
|
21
tox.ini
Normal file
21
tox.ini
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[tox]
|
||||||
|
envlist = py26,py27,pep8
|
||||||
|
minversion = 1.6
|
||||||
|
skipsdist = True
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
commands = testr run {posargs}
|
||||||
|
|
||||||
|
[testenv:pep8]
|
||||||
|
commands = flake8
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
show-source = True
|
||||||
|
builtins = _
|
||||||
|
exclude=.venv,.git,.tox,*lib/python*,private
|
Loading…
Reference in New Issue
Block a user