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

Method testInheritFlagsTimeout

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

Source from the content-addressed store, hash-verified

5377 self.cli.connect((HOST, self.port))
5378
5379 def testInheritFlagsTimeout(self):
5380 # bpo-7995: accept() on a listening socket with a timeout and the
5381 # default timeout is None, the resulting socket must inherit
5382 # the default timeout.
5383 default_timeout = 20.0
5384 with socket_setdefaulttimeout(default_timeout):
5385 self.serv.settimeout(10)
5386 conn, addr = self.serv.accept()
5387 self.addCleanup(conn.close)
5388 self.assertEqual(conn.gettimeout(), default_timeout)
5389
5390 def _testInheritFlagsTimeout(self):
5391 self.cli.connect((HOST, self.port))

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected