mirror of https://github.com/python/cpython
Fix a typo.
Add a sleep (yuck!) to _testRecvFrom() so the server can set up first.
This commit is contained in:
parent
022640dea0
commit
dfad1a9039
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue