MCPcopy Index your code
hub / github.com/python/cpython / client

Method client

Lib/test/test_asyncio/test_ssl.py:322–339  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

320 sock.close()
321
322 async def client(addr):
323 reader, writer = await asyncio.open_connection(
324 *addr,
325 ssl=client_sslctx,
326 server_hostname='',
327 ssl_handshake_timeout=HANDSHAKE_TIMEOUT)
328
329 writer.write(A_DATA)
330 self.assertEqual(await reader.readexactly(2), b'OK')
331
332 writer.write(B_DATA)
333 self.assertEqual(await reader.readexactly(4), b'SPAM')
334
335 nonlocal CNT
336 CNT += 1
337
338 writer.close()
339 await self.wait_closed(writer)
340
341 async def client_sock(addr):
342 sock = socket.socket()

Callers 12

testBasic1Method · 0.45
testSourceAddressMethod · 0.45
testBasic2Method · 0.45
testLocalHostNameMethod · 0.45
testTimeoutDefaultMethod · 0.45
testTimeoutNoneMethod · 0.45
testTimeoutZeroMethod · 0.45
testTimeoutValueMethod · 0.45
test_debuglevelMethod · 0.45
test_debuglevel_2Method · 0.45
testTimeoutZeroMethod · 0.45

Calls 15

wait_closedMethod · 0.95
readexactlyMethod · 0.80
socketMethod · 0.80
wrap_socketMethod · 0.80
ClientProtoClass · 0.70
ClientProtoFirstClass · 0.70
ClientProtoSecondClass · 0.70
writeMethod · 0.45
assertEqualMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected