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

Method bind

Lib/test/test_socket.py:6306–6316  ·  view source on GitHub ↗
(self, sock, path)

Source from the content-addressed store, hash-verified

6304 path, sys.getfilesystemencoding()))
6305
6306 def bind(self, sock, path):
6307 # Bind the socket
6308 try:
6309 socket_helper.bind_unix_socket(sock, path)
6310 except OSError as e:
6311 if str(e) == "AF_UNIX path too long":
6312 self.skipTest(
6313 "Pathname {0!a} is too long to serve as an AF_UNIX path"
6314 .format(path))
6315 else:
6316 raise
6317
6318 def testUnbound(self):
6319 # Issue #30205 (note getsockname() can return None on OS X)

Callers 15

testStrAddrMethod · 0.95
testBytesAddrMethod · 0.95
testUnencodableAddrMethod · 0.95
setUpMethod · 0.45
clientSetUpMethod · 0.45
clientSetUpMethod · 0.45
setUpMethod · 0.45
test_reprMethod · 0.45
testSendtoErrorsMethod · 0.45
testSockNameMethod · 0.45
testCloseExceptionMethod · 0.45

Calls 3

strFunction · 0.85
skipTestMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected