#NEWLINE# @ classmethod #NEWLINE# def run( cls , * args , **kwargs ) : #NEWLINE# #INDENT# test = None #NEWLINE# if ( len ( args ) >= 1 ) : #NEWLINE# #INDENT# test = args [ 0 ] #NEWLINE# #UNINDENT# from cactus import site #NEWLINE# site = site . Site ( os . getcwd ( ) ) #NEWLINE# if ( not kwargs . get ( 'nobuild' , False ) ) : #NEWLINE# #INDENT# site . build ( dist = True ) #NEWLINE# #UNINDENT# if ( not test ) : #NEWLINE# #INDENT# logging . info ( '' ) #NEWLINE# logging . info ( 'Running all tests...' ) #NEWLINE# success = True #NEWLINE# for ( name , test_obj ) in site . _tests . iteritems ( ) : #NEWLINE# #INDENT# success &= cls . _runtest ( name , success ) #NEWLINE# #UNINDENT# return success #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logging . info ( '' ) #NEWLINE# return cls . _runtest ( test , site . _tests [ test ] )