@@ -51,8 +51,9 @@ def _setUp(self):
5151 self .queue = Queue .Queue (1 )
5252
5353 # Do some munging to start the client test.
54- test_method = getattr (self , '' .join (('_' , self ._TestCase__testMethodName )))
55- self .client_thread = thread .start_new_thread (self .clientRun , (test_method , ))
54+ test_method = getattr (self , '_' + self ._TestCase__testMethodName )
55+ self .client_thread = thread .start_new_thread (
56+ self .clientRun , (test_method ,))
5657
5758 self .__setUp ()
5859 self .ready .wait ()
@@ -281,7 +282,7 @@ def testOverFlowRecv(self):
281282 """Testing receive in chunks over TCP."""
282283 seg1 = self .cli_conn .recv (len (MSG ) - 3 )
283284 seg2 = self .cli_conn .recv (1024 )
284- msg = '' . join (( seg1 , seg2 ))
285+ msg = seg1 + seg2
285286 self .assertEqual (msg , MSG )
286287
287288 def _testOverFlowRecv (self ):
@@ -301,7 +302,7 @@ def testOverFlowRecvFrom(self):
301302 """Testing recvfrom() in chunks over TCP."""
302303 seg1 , addr = self .cli_conn .recvfrom (len (MSG )- 3 )
303304 seg2 , addr = self .cli_conn .recvfrom (1024 )
304- msg = '' . join (( seg1 , seg2 ))
305+ msg = seg1 + seg2
305306 hostname , port = addr
306307 ##self.assertEqual(hostname, socket.gethostbyname('localhost'))
307308 self .assertEqual (msg , MSG )
@@ -320,7 +321,7 @@ def testSendAll(self):
320321 self .assert_ (len (read ) == 1024 , "Error performing sendall." )
321322
322323 def _testSendAll (self ):
323- big_chunk = '' . join ([ ' f' ] * 2048 )
324+ big_chunk = 'f' * 2048
324325 self .serv_conn .sendall (big_chunk )
325326
326327 def testFromFd (self ):
@@ -473,7 +474,7 @@ def testSmallRead(self):
473474 """Performing small file read test."""
474475 first_seg = self .serv_file .read (len (MSG )- 3 )
475476 second_seg = self .serv_file .read (3 )
476- msg = '' . join (( first_seg , second_seg ))
477+ msg = first_seg + second_seg
477478 self .assertEqual (msg , MSG )
478479
479480 def _testSmallRead (self ):
0 commit comments