#NEWLINE# def teardown( ) : #NEWLINE# #INDENT# time . sleep ( 1 ) #NEWLINE# while launchers : #NEWLINE# #INDENT# p = launchers . pop ( ) #NEWLINE# if ( p . poll ( ) is None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# p . stop ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# print ( p ) #NEWLINE# pass #NEWLINE# #UNINDENT# #UNINDENT# if ( p . poll ( ) is None ) : #NEWLINE# #INDENT# time . sleep ( 0.25 ) #NEWLINE# #UNINDENT# if ( p . poll ( ) is None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# print ( 'cleaning up test process...' ) #NEWLINE# p . signal ( SIGKILL ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# print ( "couldn't shutdown process: " , p ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# blackhole . close ( )