Ticket #16534: djangotestsuiterunner.diff

File djangotestsuiterunner.diff, 1.3 KB (added by Tom Christie, 13 years ago)
  • django/test/simple.py

    diff --git a/django/test/simple.py b/django/test/simple.py
    index c9adfd2..acf8764 100644
    a b def dependency_ordered(test_databases, dependencies):  
    220220        test_databases = deferred
    221221    return ordered_test_databases
    222222
     223
     224
    223225class DjangoTestSuiteRunner(object):
     226    suiteclass = unittest.TestSuite
     227    runnerclass = unittest.TextTestRunner
     228
    224229    def __init__(self, verbosity=1, interactive=True, failfast=True, **kwargs):
    225230        self.verbosity = verbosity
    226231        self.interactive = interactive
    class DjangoTestSuiteRunner(object):  
    232237        unittest.installHandler()
    233238
    234239    def build_suite(self, test_labels, extra_tests=None, **kwargs):
    235         suite = unittest.TestSuite()
     240        suite = self.suiteclass()
    236241
    237242        if test_labels:
    238243            for label in test_labels:
    class DjangoTestSuiteRunner(object):  
    308313        return old_names, mirrors
    309314
    310315    def run_suite(self, suite, **kwargs):
    311         return unittest.TextTestRunner(verbosity=self.verbosity, failfast=self.failfast).run(suite)
     316        return self.runnerclass(verbosity=self.verbosity, failfast=self.failfast).run(suite)
    312317
    313318    def teardown_databases(self, old_config, **kwargs):
    314319        from django.db import connections
Back to Top