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

Method clientSetUp

Lib/test/test_socket.py:593–601  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

591 self.addCleanup(self.conn.close)
592
593 def clientSetUp(self):
594 time.sleep(0.1)
595 self.cli = socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM)
596 self.addCleanup(self.cli.close)
597 cid = get_cid()
598 if cid in (socket.VMADDR_CID_HOST, socket.VMADDR_CID_ANY):
599 # gh-119461: Use the local communication address (loopback)
600 cid = socket.VMADDR_CID_LOCAL
601 self.cli.connect((cid, VSOCKPORT))
602
603 def testStream(self):
604 try:

Callers

nothing calls this directly

Calls 5

get_cidFunction · 0.85
socketMethod · 0.80
addCleanupMethod · 0.80
sleepMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected