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

Method testInheritFlagsBlocking

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

Source from the content-addressed store, hash-verified

5468 pass
5469
5470 def testInheritFlagsBlocking(self):
5471 # bpo-7995: accept() on a listening socket with a timeout and the
5472 # default timeout is None, the resulting socket must be blocking.
5473 with socket_setdefaulttimeout(None):
5474 self.serv.settimeout(10)
5475 conn, addr = self.serv.accept()
5476 self.addCleanup(conn.close)
5477 self.assertIsNone(conn.gettimeout())
5478
5479 def _testInheritFlagsBlocking(self):
5480 self.cli.connect((HOST, self.port))

Callers

nothing calls this directly

Calls 6

socket_setdefaulttimeoutFunction · 0.85
addCleanupMethod · 0.80
assertIsNoneMethod · 0.80
settimeoutMethod · 0.45
acceptMethod · 0.45
gettimeoutMethod · 0.45

Tested by

no test coverage detected