From patchwork Sun Mar 22 21:03:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 453232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AF5E814012F for ; Mon, 23 Mar 2015 08:09:28 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 969BC1A2AE5 for ; Mon, 23 Mar 2015 08:09:28 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from BLU004-OMC3S21.hotmail.com (blu004-omc3s21.hotmail.com [65.55.116.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 10C701A2AE7 for ; Mon, 23 Mar 2015 08:09:11 +1100 (AEDT) Received: from BLU436-SMTP251 ([65.55.116.74]) by BLU004-OMC3S21.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Sun, 22 Mar 2015 14:03:54 -0700 X-TMN: [pDnidHHHjSA1oJ0gAGMVPh9MCsKaceXS] X-Originating-Email: [stephenfinucane@hotmail.com] Message-ID: From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [v4 4/5] tox: Add tox.ini file Date: Sun, 22 Mar 2015 21:03:22 +0000 X-Mailer: git-send-email 2.1.0 In-Reply-To: <1427058203-32476-1-git-send-email-stephenfinucane@hotmail.com> References: <1427058203-32476-1-git-send-email-stephenfinucane@hotmail.com> X-OriginalArrivalTime: 22 Mar 2015 21:03:51.0662 (UTC) FILETIME=[B2F6D8E0:01D064E3] MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Currently this contains calls to execute the following on the code base: * Unit tests (for all currently supported versions of Django). This requires the addition of a "test" 'local_settings' file * PEP8 (or, rather, flake8) Signed-off-by: Stephen Finucane --- apps/patchwork/tests/local_settings.py | 13 +++++++++++++ tox.ini | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 apps/patchwork/tests/local_settings.py create mode 100644 tox.ini diff --git a/apps/patchwork/tests/local_settings.py b/apps/patchwork/tests/local_settings.py new file mode 100644 index 0000000..7c567ec --- /dev/null +++ b/apps/patchwork/tests/local_settings.py @@ -0,0 +1,13 @@ +import os + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'HOST': 'localhost', + 'PORT': '', + 'USER': os.environ['PW_TEST_DB_USER'], + 'PASSWORD': os.environ['PW_TEST_DB_PASS'], + 'NAME': 'patchwork', + 'TEST_CHARSET': 'utf8', + }, +} diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..159ad5d --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +envlist = py27,django15,django16,django17,pep8 +skipsdist = True + +[testenv:pep8] +deps = flake8 +commands = flake8 {posargs} + +[flake8] +ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405 + +[testenv:django15] +deps = -r{toxinidir}/docs/requirements-django-1.5-mysql.txt +setenv = + PYTHONPATH = {toxinidir}/apps/patchwork/tests +commands = {toxinidir}/apps/manage.py test patchwork + +[testenv:django16] +deps = -r{toxinidir}/docs/requirements-django-1.6-mysql.txt +setenv = + PYTHONPATH = {toxinidir}/apps/patchwork/tests +commands = {toxinidir}/apps/manage.py test patchwork + +[testenv:django17] +deps = -r{toxinidir}/docs/requirements-django-1.7-mysql.txt +setenv = + PYTHONPATH = {toxinidir}/apps/patchwork/tests +commands = {toxinidir}/apps/manage.py test patchwork