#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# server_file = os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , '..' , 'bin' , 'rpyc_classic.py' ) #NEWLINE# self . proc = subprocess . Popen ( [ sys . executable , line , '--mode=oneshot' , '--host=localhost' , '-p0' ] , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# line = self . proc . stdout . readline ( ) . strip ( ) #NEWLINE# if ( not line ) : #NEWLINE# #INDENT# print ( self . proc . stderr . read ( ) ) #NEWLINE# self . fail ( 'server failed to start' ) #NEWLINE# #UNINDENT# self . assertEqual ( line , b ( 'rpyc-oneshot' ) , 'server failed to start' ) #NEWLINE# ( host , port ) = self . proc . stdout . readline ( ) . strip ( ) . split ( b ( '\t' ) ) #NEWLINE# self . conn = rpyc . classic . connect ( host , int ( port ) )