Enable pep8 tests

Change-Id: I476c335b60d3195a2381a91ad05d8f64f62190d0
Partially-Implements: blueprint enable-flake8
This commit is contained in:
Borne Mace 2015-07-10 14:13:47 -07:00
parent 9b9923fa71
commit 160d163878
2 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,4 @@
hacking>=0.10.0
oslo.log>=1.0.0 # Apache-2.0 oslo.log>=1.0.0 # Apache-2.0
oslotest>=1.5.1 # Apache-2.0 oslotest>=1.5.1 # Apache-2.0
PyYAML PyYAML

17
tox.ini
View File

@ -1,27 +1,29 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
skipsdist = True skipsdist = True
envlist = functional envlist = functional,pep8
[testenv] [testenv]
install_command = pip install {opts} {packages} install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8] [testenv:pep8]
deps = PyYAML
commands = commands =
{toxinidir}/tools/validate-all-json.sh {toxinidir}/tools/validate-all-json.sh
{toxinidir}/tools/validate-all-yaml.sh {toxinidir}/tools/validate-all-yaml.sh
{toxinidir}/tools/validate-all-maintainer.sh {toxinidir}/tools/validate-all-maintainer.sh
{toxinidir}/tools/validate-links.sh {toxinidir}/tools/validate-links.sh
{toxinidir}/tools/validate-min-env-vars.sh {toxinidir}/tools/validate-min-env-vars.sh
flake8
[testenv:validate-contents] [testenv:validate-contents]
deps = PyYAML
commands = commands =
{toxinidir}/tools/validate-all-json.sh {toxinidir}/tools/validate-all-json.sh
{toxinidir}/tools/validate-all-yaml.sh {toxinidir}/tools/validate-all-yaml.sh
{toxinidir}/tools/validate-all-maintainer.sh {toxinidir}/tools/validate-all-maintainer.sh
{toxinidir}/tools/validate-links.sh {toxinidir}/tools/validate-links.sh
{toxinidir}/tools/validate-min-env-vars.sh
[testenv:bashate] [testenv:bashate]
deps = bashate deps = bashate
@ -35,7 +37,6 @@ whitelist_externals = bash
commands = bash -c tests/setup_gate.sh commands = bash -c tests/setup_gate.sh
[testenv:images] [testenv:images]
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = find whitelist_externals = find
bash bash
sudo sudo
@ -53,11 +54,13 @@ commands =
# tools/test-deploy # tools/test-deploy
[testenv:functional] [testenv:functional]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = find whitelist_externals = find
bash bash
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi" bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run ^(?!test_images).* testr run ^(?!test_images).*
[flake8]
show-source = True
exclude=.git,.tox,doc