From patchwork Wed Feb 16 18:41:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Wallenstein X-Patchwork-Id: 83387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 4F9AFB7103 for ; Thu, 17 Feb 2011 05:41:42 +1100 (EST) Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by ozlabs.org (Postfix) with ESMTP id 57975B70A4 for ; Thu, 17 Feb 2011 05:41:40 +1100 (EST) Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de ) by mailout07.t-online.de with smtp id 1PpmJj-0006SJ-0l; Wed, 16 Feb 2011 19:41:35 +0100 Received: from localhost (bNhgnZZrrhKoXNSbYr-DuegIaQMeQtWpPxVPZotrBlUWV9bqFEdunnCj2TaBnd6Zp6@[84.139.34.162]) by fwd09.t-online.de with esmtp id 1PpmJd-19ec9A0; Wed, 16 Feb 2011 19:41:29 +0100 Date: Wed, 16 Feb 2011 19:41:30 +0100 From: Dirk Wallenstein To: Guilherme Salgado Subject: [PATCH] Support execution of single tests Message-ID: <20110216184130.GA15714@zap> References: <1297867072.2597.50.camel@feioso> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1297867072.2597.50.camel@feioso> User-Agent: Mutt/1.5.21 (2010-09-15) X-ID: bNhgnZZrrhKoXNSbYr-DuegIaQMeQtWpPxVPZotrBlUWV9bqFEdunnCj2TaBnd6Zp6 X-TOI-MSGID: 9005187f-b4a3-4087-b7fd-c5d6443885ce Cc: patchwork X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Django does not use suite() when executing single tests. Importing all tests directly into __init__.py has the same effect as the replaced version of suite(). Signed-off-by: Dirk Wallenstein --- The missing support is in django.test.simple.build_test. I've had this in my queue but wanted to look for a reason for the missing support. I think I have read it somewhere, that it is on purpose. apps/patchwork/tests/__init__.py | 19 +++++-------------- 1 files changed, 5 insertions(+), 14 deletions(-) diff --git a/apps/patchwork/tests/__init__.py b/apps/patchwork/tests/__init__.py index 5ec3923..57e15cd 100644 --- a/apps/patchwork/tests/__init__.py +++ b/apps/patchwork/tests/__init__.py @@ -17,17 +17,8 @@ # along with Patchwork; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import unittest -from patchwork.tests import patchparser, encodings, bundles, mboxviews, updates - -modules = [patchparser, encodings, bundles, mboxviews, updates] - -def suite(): - suite = unittest.TestSuite() - loader = unittest.TestLoader() - - for module in modules: - tests = loader.loadTestsFromModule(module) - suite.addTests(tests) - - return suite +from patchwork.tests.patchparser import * +from patchwork.tests.encodings import * +from patchwork.tests.bundles import * +from patchwork.tests.mboxviews import * +from patchwork.tests.updates import *