diff --git a/.gitignore b/.gitignore index e4078ff4..55faa277 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ +*.pyc +*.swp +*~ +.tox cfn/cloudformation-examples/ private +.testrepository diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 00000000..a2ff14b2 --- /dev/null +++ b/.testr.conf @@ -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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..e69de29b diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..1c75dc0b --- /dev/null +++ b/test-requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..c4b2fb06 --- /dev/null +++ b/tox.ini @@ -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 \ No newline at end of file