summaryrefslogtreecommitdiff
path: root/django/core/management.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-07-28 04:02:52 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-07-28 04:02:52 +0000
commit650cea9170313d9a2197d4050f6dcabaaeaa3b20 (patch)
tree971b87274c3a17d6e8df842ecf48a98d594602e1 /django/core/management.py
parent5b8d2c9f0df1dbfadafeea6420fc5fc175e00376 (diff)
Fixed #4460 -- Added the ability to be more specific in the test cases that are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/management.py')
-rw-r--r--django/core/management.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 4862a7833f..edf11ce478 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -1331,16 +1331,11 @@ def runfcgi(args):
runfastcgi(args)
runfcgi.args = '[various KEY=val options, use `runfcgi help` for help]'
-def test(app_labels, verbosity=1, interactive=True):
+def test(test_labels, verbosity=1, interactive=True):
"Runs the test suite for the specified applications"
from django.conf import settings
from django.db.models import get_app, get_apps
-
- if len(app_labels) == 0:
- app_list = get_apps()
- else:
- app_list = [get_app(app_label) for app_label in app_labels]
-
+
test_path = settings.TEST_RUNNER.split('.')
# Allow for Python 2.5 relative paths
if len(test_path) > 1:
@@ -1350,7 +1345,7 @@ def test(app_labels, verbosity=1, interactive=True):
test_module = __import__(test_module_name, {}, {}, test_path[-1])
test_runner = getattr(test_module, test_path[-1])
- failures = test_runner(app_list, verbosity=verbosity, interactive=interactive)
+ failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
if failures:
sys.exit(failures)