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:
Steve Baker 2014-10-09 13:30:35 +13:00
parent 89f2f7e0b0
commit c393625dfa
5 changed files with 44 additions and 0 deletions

5
.gitignore vendored
View File

@ -1,2 +1,7 @@
*.pyc
*.swp
*~
.tox
cfn/cloudformation-examples/
private
.testrepository

4
.testr.conf Normal file
View 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
View File

14
test-requirements.txt Normal file
View 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
View 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