[ovs-dev] [PATCH 05/55] python: Add pep8 test environment.
Russell Bryant
russell at ovn.org
Mon Dec 21 20:47:05 UTC 2015
PEP8 is the Python formatting standard. This test environment catches
cases where the code deviates from this standard. We exclude all of the
rules currently violated so we can start with a passing configuration.
They can be removed over time when they get cleaned up.
Signed-off-by: Russell Bryant <russell at ovn.org>
---
python/test-requirements.txt | 1 +
python/tox.ini | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/python/test-requirements.txt b/python/test-requirements.txt
index eae9d4f..8ee182a 100644
--- a/python/test-requirements.txt
+++ b/python/test-requirements.txt
@@ -1,2 +1,3 @@
# test dependencies
nose
+flake8
diff --git a/python/tox.ini b/python/tox.ini
index 06b2e2a..9f5947b 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -1,13 +1,20 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
+# test suite on all supported python versions. To use it,"pip install tox"
# and then run "tox" from this directory.
[tox]
-envlist = py27,py34
+envlist = py27,py34,pep8
[testenv]
usedevelop = True
commands = {envbindir}/nosetests ovs/tests
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
+
+[testenv:pep8]
+commands = flake8
+
+[flake8]
+ignore=E111,E113,E126,E127,E128,E129,E131,E201,E203,E226,E231,E241,E251,E261,E262,E265,E271,E302,E303,E501,E711,E721
+exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
--
2.5.0
More information about the dev
mailing list