Skip to content

Commit 59edf12

Browse files
authored
gh-57911: Fix failing symlink test in tarfile (GH-138626)
1 parent 7a3bca5 commit 59edf12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_tarfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3694,7 +3694,7 @@ def setUpClass(cls):
36943694
else:
36953695
raise AssertionError('Could not determine link resolution')
36963696
else:
3697-
cls.dotdot_resolves_early = True
3697+
cls.dotdot_resolves_early = False
36983698

36993699
@contextmanager
37003700
def check_context(self, tar, filter, *, check_flag=True):
@@ -3842,7 +3842,7 @@ def test_parent_symlink(self):
38423842
arc.add('current', symlink_to='.')
38433843

38443844
# effectively points to ./../
3845-
if self.dotdot_resolves_early:
3845+
if self.dotdot_resolves_early and os_helper.can_symlink():
38463846
arc.add('parent', symlink_to='current/../..')
38473847
else:
38483848
arc.add('parent', symlink_to='current/..')

0 commit comments

Comments
 (0)