diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-02-28 04:46:38 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-02-28 04:46:38 +0000 |
| commit | beb20057a30a96b74dfc309c2add47148103ba63 (patch) | |
| tree | 6747be928a805729e881db9f0a380dbcc55c3a26 /tests | |
| parent | 415ffa8df56d72bf6f114abc8fdae11d459e768d (diff) | |
Fixed #10165 -- Use settings.TEST_RUNNER in runtests.py
This permits running Django's core tests under an alternative test runner. Most
likely useful to non-CPython implementations, rather than much else (since
Django's core tests might assume things about the test runner).
Patch from Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/runtests.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index cc9594b5fe..bd7f59bdf0 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -149,8 +149,12 @@ def django_tests(verbosity, interactive, test_labels): pass # Run the test suite, including the extra validation tests. - from django.test.simple import run_tests - failures = run_tests(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests) + from django.test.utils import get_runner + if not hasattr(settings, 'TEST_RUNNER'): + settings.TEST_RUNNER = 'django.test.simple.run_tests' + test_runner = get_runner(settings) + + failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests) if failures: sys.exit(failures) |
