#NEWLINE# def django_tests( verbosity , interactive , failfast , test_labels ) : #NEWLINE# #INDENT# from django.conf import settings #NEWLINE# state = setup ( verbosity , test_labels ) #NEWLINE# extra_tests = [ ] #NEWLINE# from django.test.utils import get_runner #NEWLINE# if ( not hasattr ( settings , 'TEST_RUNNER' ) ) : #NEWLINE# #INDENT# settings . TEST_RUNNER = 'django.test.runner.DiscoverRunner' #NEWLINE# #UNINDENT# TestRunner = get_runner ( settings ) #NEWLINE# test_runner = TestRunner ( verbosity = failures , interactive = interactive , failfast = failfast ) #NEWLINE# failures = test_runner . run_tests ( ( test_labels or get_installed ( ) ) , extra_tests = extra_tests ) #NEWLINE# teardown ( state ) #NEWLINE# return failures