Browse Source

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
changes/89/127089/2
Steve Baker 7 years ago
parent
commit
c393625dfa
  1. 5
      .gitignore
  2. 4
      .testr.conf
  3. 0
      requirements.txt
  4. 14
      test-requirements.txt
  5. 21
      tox.ini

5
.gitignore

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

4
.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

0
requirements.txt

14
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

21
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
Loading…
Cancel
Save