Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test_shutil.py
  • Loading branch information
ShaharNaveh committed Sep 10, 2025
commit 5b161afc4ed1447913cce7bbaac8fd2675fd675c
7 changes: 1 addition & 6 deletions Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def test_rmtree_works_on_bytes(self):
self.assertIsInstance(victim, bytes)
shutil.rmtree(victim)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_rmtree_fails_on_symlink_onerror(self):
tmp = self.mkdtemp()
Expand All @@ -216,7 +215,6 @@ def onerror(*args):
self.assertEqual(errors[0][1], link)
self.assertIsInstance(errors[0][2][1], OSError)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_rmtree_fails_on_symlink_onexc(self):
tmp = self.mkdtemp()
Expand Down Expand Up @@ -1087,7 +1085,6 @@ def test_copymode_follow_symlinks(self):
shutil.copymode(src_link, dst_link)
self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(hasattr(os, 'lchmod') or os.name == 'nt', 'requires os.lchmod')
@os_helper.skip_unless_symlink
def test_copymode_symlink_to_symlink(self):
Expand Down Expand Up @@ -1317,7 +1314,6 @@ def test_copy(self):
self.assertTrue(os.path.exists(file2))
self.assertEqual(os.stat(file1).st_mode, os.stat(file2).st_mode)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copy_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1360,7 +1356,6 @@ def test_copy2(self):
self.assertEqual(getattr(file1_stat, 'st_flags'),
getattr(file2_stat, 'st_flags'))

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copy2_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1445,7 +1440,6 @@ def _test_copy_dir(self, copy_func):

### shutil.copyfile

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copyfile_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1483,6 +1477,7 @@ def test_dont_copy_file_onto_link_to_itself(self):
finally:
shutil.rmtree(TESTFN, ignore_errors=True)

@unittest.expectedFailureIfWindows('TODO: RUSTPYTHON')
@os_helper.skip_unless_symlink
def test_dont_copy_file_onto_symlink_to_itself(self):
# bug 851123.
Expand Down