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

Method test_set_inheritable_cloexec

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

Source from the content-addressed store, hash-verified

6520
6521 @unittest.skipIf(fcntl is None, "need fcntl")
6522 def test_set_inheritable_cloexec(self):
6523 sock = socket.socket()
6524 with sock:
6525 fd = sock.fileno()
6526 self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
6527 fcntl.FD_CLOEXEC)
6528
6529 sock.set_inheritable(True)
6530 self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
6531 0)
6532
6533
6534 def test_socketpair(self):

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
set_inheritableMethod · 0.80
filenoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected