'module_list is ignored - we\'re just required to have this signature as a
Django test runner.'

def run_tests(self):

    doctest_paths = self._get_doctest_paths()
    modules = self._get_modules()
    total_errors = 0
    old_db = settings.DATABASES['default']['NAME']
    django.test.utils.setup_test_environment()
    connection.creation.create_test_db()
    try:
        for module in modules:
            (failures, test_count) = doctest.testmod(module)
            print (self._PRINT_AFTER % (test_count, module.__name__))
            total_errors += failures
        for path in doctest_paths:
            (failures, test_count) = doctest.testfile(path, module_relative=False)
            print (self._PRINT_AFTER % (test_count, path))
            total_errors += failures
    finally:
        connection.creation.destroy_test_db(old_db)
        django.test.utils.teardown_test_environment()
    print
    if (total_errors == 0):
        print 'OK'
    else:
        print ('FAIL:    %d    errors' % total_errors)
    return total_errors
