#NEWLINE# def test_run( ) : #NEWLINE# #INDENT# p = None #NEWLINE# for port in range ( 18800 , 18900 ) : #NEWLINE# #INDENT# ( r , p ) = start_server ( port ) #NEWLINE# if ( ( r == 'ok' ) and r ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# assert ( to_bytes ( 'ok' ) == fetch ( port , 'test' ) ) #NEWLINE# os . kill ( p . pid , signal . SIGTERM ) #NEWLINE# while ( p . poll ( ) == None ) : #NEWLINE# #INDENT# os . kill ( p . pid , signal . SIGTERM ) #NEWLINE# time . sleep ( 1 )