#NEWLINE# def run( self , **kwargs ) : #NEWLINE# #INDENT# with self . chdir ( kwargs . get ( 'working_dir' ) ) : #NEWLINE# #INDENT# p = os . path . join ( os . getcwd ( ) , 'tests' ) #NEWLINE# patt = kwargs . get ( 'loader_pattern' , 'test*.py' ) #NEWLINE# if ( kwargs . get ( 'active_file_only' ) is True ) : #NEWLINE# #INDENT# patt = os . path . basename ( self . window . active_view ( ) . file_name ( ) ) #NEWLINE# #UNINDENT# suite = unittest . TestLoader ( ) . discover ( p , pattern = patt ) #NEWLINE# file_regex = '^\\s*File\\s*"([^.].*?)",\\s*line\\s*(\\d+),.*$' #NEWLINE# display = OutputPanel ( 'dart.tests' , file_regex = file_regex ) #NEWLINE# display . show ( ) #NEWLINE# runner = unittest . TextTestRunner ( stream = display , verbosity = 1 ) #NEWLINE# def run_and_display( ) : #NEWLINE# #INDENT# runner . run ( suite ) #NEWLINE# #UNINDENT# threading . Thread ( target = run_and_display ) . start ( )