﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14335	add ability to only test specific apps	Anand Kumria	nobody	"Hi,

Some Django applications, e.g. ghettoq, ship with a lot of unittests. 

In ghettoq's case, there are a number of backends that can be configured and the tests assume that they all will be.

That is fantastic work on behalf of the ghettoq developers but it can make it hard to integrate into a CI environment.

To overcome this problem, ghetto recommends using a testrunner that they bundle.

In this test runner, the setting TEST_APPS, if found, contains the list of applications to be tested.

Below is a one-liner that allows for this.

It also need an entry in the documentation but I believe this would be a nice win for both Django 1.2 and 1.3

Thanks,
Anand

{{{
diff --git a/django/test/simple.py b/django/test/simple.py
index 9013042..216c85f 100644
--- a/django/test/simple.py
+++ b/django/test/simple.py
@@ -236,6 +236,8 @@ class DjangoTestSuiteRunner(object):
     def build_suite(self, test_labels, extra_tests=None, **kwargs):
         suite = unittest.TestSuite()
 
+        test_labels = getattr(settings, ""TEST_APPS"", test_labels)
+
         if test_labels:
             for label in test_labels:
                 if '.' in label:

}}}"		closed	Testing framework	1.2		wontfix	need_docs		Unreviewed	1	0	0	0	0	0
