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

Method test_get_set_inheritable

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

Source from the content-addressed store, hash-verified

4734@support.requires_subprocess()
4735class FDInheritanceTests(unittest.TestCase):
4736 def test_get_set_inheritable(self):
4737 fd = os.open(__file__, os.O_RDONLY)
4738 self.addCleanup(os.close, fd)
4739 self.assertEqual(os.get_inheritable(fd), False)
4740
4741 os.set_inheritable(fd, True)
4742 self.assertEqual(os.get_inheritable(fd), True)
4743
4744 @unittest.skipIf(fcntl is None, "need fcntl")
4745 def test_get_inheritable_cloexec(self):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected