#NEWLINE# def runtests( * test_args ) : #NEWLINE# #INDENT# if ( not settings . configured ) : #NEWLINE# #INDENT# settings . configure ( ** DEFAULT_SETTINGS ) #NEWLINE# #UNINDENT# django . setup ( ) #NEWLINE# parent = os . path . dirname ( os . path . abspath ( __file__ ) ) #NEWLINE# sys . path . insert ( 0 , parent ) #NEWLINE# try : #NEWLINE# #INDENT# from django.test.runner import DiscoverRunner #NEWLINE# runner_class = DiscoverRunner #NEWLINE# test_args = [ 'pinax.models.tests' ] #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# from django.test.simple import DjangoTestSuiteRunner #NEWLINE# runner_class = DjangoTestSuiteRunner #NEWLINE# test_args = [ 'tests' ] #NEWLINE# #UNINDENT# failures = runner_class ( verbosity = 1 , interactive = True , failfast = False ) . run_tests ( failures ) #NEWLINE# sys . exit ( failures )