summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-06-10 08:26:05 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-06-10 08:26:05 +0000
commit046ffa483ed63faae7b31e7e2cf618f88a3312ba (patch)
treed90ffd710a4bbcd5db38469eb144efcb1c85e178 /django/test
parentb56ef75088e17fa3555766e92a6747411ccd738c (diff)
Fixed #16185, #15675 -- Added the ability for test runners to define custom options, and to specify a custom test runner at the command line. Thanks to Dmitry Jemerov and Mikołaj Siedlarek for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/test')
-rw-r--r--django/test/utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/django/test/utils.py b/django/test/utils.py
index c394dacfd6..b9f4743a34 100644
--- a/django/test/utils.py
+++ b/django/test/utils.py
@@ -118,8 +118,11 @@ def restore_warnings_state(state):
warnings.filters = state[:]
-def get_runner(settings):
- test_path = settings.TEST_RUNNER.split('.')
+def get_runner(settings, test_runner_class=None):
+ if not test_runner_class:
+ test_runner_class = settings.TEST_RUNNER
+
+ test_path = test_runner_class.split('.')
# Allow for Python 2.5 relative paths
if len(test_path) > 1:
test_module_name = '.'.join(test_path[:-1])