mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue