(self)
| 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): |
nothing calls this directly
no test coverage detected