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

Method test_set_inheritable_cloexec

Lib/test/test_os.py:4758–4766  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4756
4757 @unittest.skipIf(fcntl is None, "need fcntl")
4758 def test_set_inheritable_cloexec(self):
4759 fd = os.open(__file__, os.O_RDONLY)
4760 self.addCleanup(os.close, fd)
4761 self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
4762 fcntl.FD_CLOEXEC)
4763
4764 os.set_inheritable(fd, True)
4765 self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC,
4766 0)
4767
4768 @unittest.skipUnless(hasattr(os, 'O_PATH'), "need os.O_PATH")
4769 def test_get_set_inheritable_o_path(self):

Callers

nothing calls this directly

Calls 4

addCleanupMethod · 0.80
set_inheritableMethod · 0.80
openMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected