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

Method clientSetUp

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

Source from the content-addressed store, hash-verified

580 self.addCleanup(self.conn.close)
581
582 def clientSetUp(self):
583 time.sleep(0.1)
584 self.cli = socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM)
585 self.addCleanup(self.cli.close)
586 cid = get_cid()
587 if cid in (socket.VMADDR_CID_HOST, socket.VMADDR_CID_ANY):
588 # gh-119461: Use the local communication address (loopback)
589 cid = socket.VMADDR_CID_LOCAL
590 self.cli.connect((cid, VSOCKPORT))
591
592 def testStream(self):
593 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