@@ -190,28 +190,28 @@ def run_servers(self, proto, servers, hdlrcls, testfunc):
190190 for svrcls in servers :
191191 addr = self .pickaddr (proto )
192192 if verbose :
193- print "ADDR =" , addr
194- print "CLASS =" , svrcls
193+ print ( "ADDR =" , addr )
194+ print ( "CLASS =" , svrcls )
195195 t = ServerThread (addr , svrcls , hdlrcls )
196- if verbose : print "server created"
196+ if verbose : print ( "server created" )
197197 t .start ()
198- if verbose : print "server running"
198+ if verbose : print ( "server running" )
199199 for i in range (NREQ ):
200200 t .ready .wait (10 * DELAY )
201201 self .assert_ (t .ready .isSet (),
202202 "Server not ready within a reasonable time" )
203- if verbose : print "test client" , i
203+ if verbose : print ( "test client" , i )
204204 testfunc (proto , addr )
205- if verbose : print "waiting for server"
205+ if verbose : print ( "waiting for server" )
206206 t .join ()
207- if verbose : print "done"
207+ if verbose : print ( "done" )
208208
209209 def stream_examine (self , proto , addr ):
210210 s = socket .socket (proto , socket .SOCK_STREAM )
211211 s .connect (addr )
212212 s .sendall (TEST_STR )
213213 buf = data = receive (s , 100 )
214- while data and '\n ' not in buf :
214+ while data and b '\n ' not in buf :
215215 data = receive (s , 100 )
216216 buf += data
217217 self .assertEquals (buf , TEST_STR )
@@ -221,7 +221,7 @@ def dgram_examine(self, proto, addr):
221221 s = socket .socket (proto , socket .SOCK_DGRAM )
222222 s .sendto (TEST_STR , addr )
223223 buf = data = receive (s , 100 )
224- while data and '\n ' not in buf :
224+ while data and b '\n ' not in buf :
225225 data = receive (s , 100 )
226226 buf += data
227227 self .assertEquals (buf , TEST_STR )
0 commit comments