MCPcopy Index your code
hub / github.com/RustPython/RustPython / client

Method client

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

Source from the content-addressed store, hash-verified

322 sock.close()
323
324 async def client(addr):
325 extras = {}
326 extras = dict(ssl_handshake_timeout=support.SHORT_TIMEOUT)
327
328 reader, writer = await asyncio.open_connection(
329 *addr,
330 ssl=client_sslctx,
331 server_hostname='',
332 **extras)
333
334 writer.write(A_DATA)
335 self.assertEqual(await reader.readexactly(2), b'OK')
336
337 writer.write(B_DATA)
338 self.assertEqual(await reader.readexactly(4), b'SPAM')
339
340 nonlocal CNT
341 CNT += 1
342
343 writer.close()
344 await self.wait_closed(writer)
345
346 async def client_sock(addr):
347 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
lenFunction · 0.85
readexactlyMethod · 0.80
socketMethod · 0.80
wrap_socketMethod · 0.80
ClientProtoClass · 0.70
ClientProtoFirstClass · 0.70
ClientProtoSecondClass · 0.70
printFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected