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

Method testAutoBindSock

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

Source from the content-addressed store, hash-verified

2675 self.assertRaises(OSError, socket_helper.bind_port, s, host=-2)
2676
2677 def testAutoBindSock(self):
2678 with socket.socket(socket.AF_QIPCRTR, socket.SOCK_DGRAM) as s:
2679 s.connect((123, 123))
2680 self.assertNotEqual(s.getsockname()[1], 0)
2681
2682@unittest.skipIf(fcntl is None, "need fcntl")
2683@unittest.skipUnless(HAVE_SOCKET_VSOCK,

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
assertNotEqualMethod · 0.80
connectMethod · 0.45
getsocknameMethod · 0.45

Tested by

no test coverage detected