(self)
| 1678 | |
| 1679 | @unittest.skipUnless(os.chmod in os.supports_dir_fd, "test needs dir_fd support in os.chmod()") |
| 1680 | def test_chmod_dir_fd(self): |
| 1681 | with self.prepare_file() as (dir_fd, name, fullname): |
| 1682 | posix.chmod(fullname, stat.S_IRUSR) |
| 1683 | posix.chmod(name, stat.S_IRUSR | stat.S_IWUSR, dir_fd=dir_fd) |
| 1684 | s = posix.stat(fullname) |
| 1685 | self.assertEqual(s.st_mode & stat.S_IRWXU, |
| 1686 | stat.S_IRUSR | stat.S_IWUSR) |
| 1687 | |
| 1688 | @unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd), |
| 1689 | "test needs dir_fd support in os.chown()") |
nothing calls this directly
no test coverage detected