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

Method setUp

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

Source from the content-addressed store, hash-verified

6395 ThreadableTest.__init__(self)
6396
6397 def setUp(self):
6398 self.srv = socket.socket(socket.AF_TIPC, socket.SOCK_STREAM)
6399 self.addCleanup(self.srv.close)
6400 self.srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
6401 srvaddr = (socket.TIPC_ADDR_NAMESEQ, TIPC_STYPE,
6402 TIPC_LOWER, TIPC_UPPER)
6403 self.srv.bind(srvaddr)
6404 self.srv.listen()
6405 self.serverExplicitReady()
6406 self.conn, self.connaddr = self.srv.accept()
6407 self.addCleanup(self.conn.close)
6408
6409 def clientSetUp(self):
6410 # There is a hittable race between serverExplicitReady() and the

Callers

nothing calls this directly

Calls 7

socketMethod · 0.80
addCleanupMethod · 0.80
serverExplicitReadyMethod · 0.80
setsockoptMethod · 0.45
bindMethod · 0.45
listenMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected