Fix a typo.

Add a sleep (yuck!) to _testRecvFrom() so the server can set up first.
This commit is contained in:
Guido van Rossum 2002-06-13 15:03:01 +00:00
parent 022640dea0
commit dfad1a9039
1 changed files with 2 additions and 1 deletions

View File

@ -359,13 +359,14 @@ class BasicUDPTest(ThreadedUDPSocketTest):
self.cli.sendto(MSG, 0, (HOST, PORT))
def testRecvFrom(self):
"""Testing recfrom() over UDP."""
"""Testing recvfrom() over UDP."""
msg, addr = self.serv.recvfrom(len(MSG))
hostname, port = addr
##self.assertEqual(hostname, socket.gethostbyname('localhost'))
self.assertEqual(msg, MSG)
def _testRecvFrom(self):
time.sleep(1) # Give server a chance to set up
self.cli.sendto(MSG, 0, (HOST, PORT))
class NonBlockingTCPTests(ThreadedTCPSocketTest):