@@ -1,2 +1,3 @@
# test dependencies
nose
+flake8
@@ -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
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@ovn.org> --- python/test-requirements.txt | 1 + python/tox.ini | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)