Skip to content

Commit e23a5f9

Browse files
committed
Fixed a regression in the test runner loading of runtests.py.
Refs django#17365, django#17366, django#18727.
1 parent 9012833 commit e23a5f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/runtests.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,12 @@ def django_tests(verbosity, interactive, failfast, test_labels):
167167
extra_tests = []
168168

169169
# Run the test suite, including the extra validation tests.
170-
from django.test.runner import DiscoverRunner
170+
from django.test.utils import get_runner
171+
if not hasattr(settings, 'TEST_RUNNER'):
172+
settings.TEST_RUNNER = 'django.test.runner.DiscoverRunner'
173+
TestRunner = get_runner(settings)
171174

172-
test_runner = DiscoverRunner(
175+
test_runner = TestRunner(
173176
verbosity=verbosity,
174177
interactive=interactive,
175178
failfast=failfast,

0 commit comments

Comments
 (0)