(self, chmod_func, target, link, **kwargs)
| 1063 | posix.chmod(target, target_mode) |
| 1064 | |
| 1065 | def check_lchmod_link(self, chmod_func, target, link, **kwargs): |
| 1066 | target_mode = os.stat(target).st_mode |
| 1067 | link_mode = os.lstat(link).st_mode |
| 1068 | new_mode = link_mode & ~(stat.S_IWOTH | stat.S_IWGRP | stat.S_IWUSR) |
| 1069 | chmod_func(link, new_mode, **kwargs) |
| 1070 | self.assertEqual(os.stat(target).st_mode, target_mode) |
| 1071 | self.assertEqual(os.lstat(link).st_mode, new_mode) |
| 1072 | new_mode = link_mode | (stat.S_IWOTH | stat.S_IWGRP | stat.S_IWUSR) |
| 1073 | chmod_func(link, new_mode, **kwargs) |
| 1074 | self.assertEqual(os.stat(target).st_mode, target_mode) |
| 1075 | self.assertEqual(os.lstat(link).st_mode, new_mode) |
| 1076 | |
| 1077 | @os_helper.skip_unless_symlink |
| 1078 | def test_chmod_file_symlink(self): |
no test coverage detected