MCPcopy Index your code
hub / github.com/python/cpython / test_chmod_dir_symlink

Method test_chmod_dir_symlink

Lib/test/test_os/test_posix.py:1150–1159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1148
1149 @os_helper.skip_unless_symlink
1150 def test_chmod_dir_symlink(self):
1151 target = self.tempdir()
1152 link = os_helper.TESTFN + '-link'
1153 os.symlink(target, link, target_is_directory=True)
1154 self.addCleanup(posix.unlink, link)
1155 if os.name == 'nt':
1156 self.check_lchmod_link(posix.chmod, target, link)
1157 else:
1158 self.check_chmod_link(posix.chmod, target, link)
1159 self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)
1160
1161 @unittest.skipUnless(hasattr(posix, 'lchmod'), 'test needs os.lchmod()')
1162 @os_helper.skip_unless_symlink

Callers

nothing calls this directly

Calls 4

tempdirMethod · 0.95
check_lchmod_linkMethod · 0.95
check_chmod_linkMethod · 0.95
addCleanupMethod · 0.80

Tested by

no test coverage detected