From patchwork Mon Dec 21 20:47:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 559701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 9A802140BA1 for ; Tue, 22 Dec 2015 07:48:51 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id E39AB1060E; Mon, 21 Dec 2015 12:48:10 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 9D57C105FD for ; Mon, 21 Dec 2015 12:48:09 -0800 (PST) Received: from bar4.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 310611610EB for ; Mon, 21 Dec 2015 13:48:09 -0700 (MST) X-ASG-Debug-ID: 1450730888-03dc213fee439470001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar4.cudamail.com with ESMTP id KwXhQWcvHxmFyQtq (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Dec 2015 13:48:08 -0700 (MST) X-Barracuda-Envelope-From: russell@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 21 Dec 2015 20:48:08 -0000 Received-SPF: neutral (mx3-pf2.cudamail.com: 209.132.183.28 is neither permitted nor denied by SPF record at ovn.org) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id EED618F4E2; Mon, 21 Dec 2015 20:48:07 +0000 (UTC) Received: from x1c.redhat.com ([10.3.112.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBLKm0dS002018; Mon, 21 Dec 2015 15:48:07 -0500 X-CudaMail-Envelope-Sender: russell@ovn.org From: Russell Bryant To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-1220053636 X-CudaMail-DTE: 122115 X-CudaMail-Originating-IP: 209.132.183.28 Date: Mon, 21 Dec 2015 15:47:05 -0500 X-ASG-Orig-Subj: [##CM-V2-1220053636##][PATCH 05/55] python: Add pep8 test environment. Message-Id: <1450730875-18083-6-git-send-email-russell@ovn.org> In-Reply-To: <1450730875-18083-1-git-send-email-russell@ovn.org> References: <1450730875-18083-1-git-send-email-russell@ovn.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1450730888 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 05/55] python: Add pep8 test environment. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 --- 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