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

Method setUp

Lib/test/test_remote_pdb.py:1016–1021  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1014 """Tests for the _connect mechanism using direct socket communication."""
1015
1016 def setUp(self):
1017 # Create a server socket that will wait for the debugger to connect
1018 self.server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1019 self.server_sock.bind(('127.0.0.1', 0)) # Let OS assign port
1020 self.server_sock.listen(1)
1021 self.port = self.server_sock.getsockname()[1]
1022
1023 def _create_script(self, script=None):
1024 # Create a file for subprocess script

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
bindMethod · 0.45
listenMethod · 0.45
getsocknameMethod · 0.45

Tested by

no test coverage detected