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

Method test_overwrite_dir_symlink_as_dir

Lib/test/archiver_tests.py:110–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108
109 @os_helper.skip_unless_symlink
110 def test_overwrite_dir_symlink_as_dir(self):
111 # XXX: It is potential security vulnerability.
112 target = os.path.join(self.testdir, 'test')
113 target2 = os.path.join(self.testdir, 'test2')
114 os.mkdir(target2)
115 os.symlink('test2', target, target_is_directory=True)
116 with self.open(self.ar_with_dir) as ar:
117 self.extractall(ar)
118 self.assertTrue(os.path.islink(target))
119 self.assertTrue(os.path.isdir(target2))
120
121 @os_helper.skip_unless_symlink
122 def test_overwrite_dir_symlink_as_implicit_dir(self):

Callers

nothing calls this directly

Calls 7

openMethod · 0.95
extractallMethod · 0.95
assertTrueMethod · 0.80
islinkMethod · 0.80
joinMethod · 0.45
mkdirMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected