(self, chmod_func, target, link, **kwargs)
| 1123 | posix.chmod(target, target_mode) |
| 1124 | |
| 1125 | def check_lchmod_link(self, chmod_func, target, link, **kwargs): |
| 1126 | target_mode = os.stat(target).st_mode |
| 1127 | link_mode = os.lstat(link).st_mode |
| 1128 | new_mode = link_mode & ~(stat.S_IWOTH | stat.S_IWGRP | stat.S_IWUSR) |
| 1129 | chmod_func(link, new_mode, **kwargs) |
| 1130 | self.assertEqual(os.stat(target).st_mode, target_mode) |
| 1131 | self.assertEqual(os.lstat(link).st_mode, new_mode) |
| 1132 | new_mode = link_mode | (stat.S_IWOTH | stat.S_IWGRP | stat.S_IWUSR) |
| 1133 | chmod_func(link, new_mode, **kwargs) |
| 1134 | self.assertEqual(os.stat(target).st_mode, target_mode) |
| 1135 | self.assertEqual(os.lstat(link).st_mode, new_mode) |
| 1136 | |
| 1137 | @os_helper.skip_unless_symlink |
| 1138 | def test_chmod_file_symlink(self): |
no test coverage detected