Skip to content

Commit

Permalink
Use support.can_symlink rather than the new os_helper.can_symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed Aug 22, 2023
1 parent 012be1e commit ef0bfc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3373,7 +3373,7 @@ def test_parent_symlink2(self):
# Posix and Windows have different pathname resolution:
# either symlink or a '..' component resolve first.
# Let's see which we are on.
if os_helper.can_symlink():
if support.can_symlink():
testpath = os.path.join(TEMPDIR, 'resolution_test')
os.mkdir(testpath)

Expand Down Expand Up @@ -3433,7 +3433,7 @@ def test_parent_symlink2(self):
self.expect_file('parent/evil')

with self.check_context(arc.open(), 'data'):
if os_helper.can_symlink():
if support.can_symlink():
if dotdot_resolves_early:
# Fail when extracting a file outside destination
self.expect_exception(
Expand Down Expand Up @@ -3568,7 +3568,7 @@ def test_deep_symlink(self):
with self.check_context(arc.open(), filter):
self.expect_file('targetdir/target', size=3)
self.expect_file('linkdir/hardlink', size=3)
if os_helper.can_symlink():
if support.can_symlink():
self.expect_file('linkdir/symlink', size=3,
symlink_to='../targetdir/target')
else:
Expand All @@ -3590,7 +3590,7 @@ def test_chains(self):
self.expect_file('targetdir/target', size=3)
self.expect_file('linkdir/hardlink', size=3)
self.expect_file('linkdir/hardlink2', size=3)
if os_helper.can_symlink():
if support.can_symlink():
self.expect_file('linkdir/symlink', size=3,
symlink_to='hardlink')
self.expect_file('symlink2', size=3,
Expand Down

0 comments on commit ef0bfc3

Please sign in to comment.