@@ -75,7 +75,7 @@ async def test_existing_socket(self):
7575 """Client connects using a pre-existing socket."""
7676 async with serve (* args ) as server :
7777 with socket .create_connection (get_host_port (server )) as sock :
78- # Use a non-existing domain to ensure we connect to sock.
78+ # Use a non-existing domain to ensure we connect via sock.
7979 async with connect ("ws://invalid/" , sock = sock ) as client :
8080 self .assertEqual (client .protocol .state .name , "OPEN" )
8181
@@ -341,7 +341,7 @@ def redirect(connection, request):
341341 async with serve (* args , process_request = redirect ) as server :
342342 with socket .create_connection (get_host_port (server )) as sock :
343343 with self .assertRaises (ValueError ) as raised :
344- # Use a non-existing domain to ensure we connect to sock.
344+ # Use a non-existing domain to ensure we connect via sock.
345345 async with connect ("ws://invalid/redirect" , sock = sock ):
346346 self .fail ("did not raise" )
347347
@@ -446,9 +446,11 @@ async def test_junk_handshake(self):
446446 """Client closes the connection when receiving non-HTTP response from server."""
447447
448448 async def junk (reader , writer ):
449- await asyncio .sleep (MS ) # wait for the client to send the handshake request
449+ # Wait for the client to send the handshake request.
450+ await asyncio .sleep (MS )
450451 writer .write (b"220 smtp.invalid ESMTP Postfix\r \n " )
451- await reader .read (4096 ) # wait for the client to close the connection
452+ # Wait for the client to close the connection.
453+ await reader .read (4096 )
452454 writer .close ()
453455
454456 server = await asyncio .start_server (junk , "localhost" , 0 )
@@ -652,7 +654,7 @@ async def test_ignore_proxy_with_existing_socket(self):
652654 """Client connects using a pre-existing socket."""
653655 async with serve (* args ) as server :
654656 with socket .create_connection (get_host_port (server )) as sock :
655- # Use a non-existing domain to ensure we connect to sock.
657+ # Use a non-existing domain to ensure we connect via sock.
656658 async with connect ("ws://invalid/" , sock = sock ) as client :
657659 self .assertEqual (client .protocol .state .name , "OPEN" )
658660 self .assertNumFlows (0 )
0 commit comments