summaryrefslogtreecommitdiff
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-02-25 14:32:27 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2019-02-25 23:32:27 +0100
commit8377cd4fcd0d51d86834c9b0518d29aac3b49e18 (patch)
treee8d82c3567b2d39ff0bd285d25ce2d02359ae070 /Lib/test/test_shutil.py
parent9c3f284de598550be6687964c23fd7599e53b20e (diff)
downloadcpython-git-8377cd4fcd0d51d86834c9b0518d29aac3b49e18.tar.gz
Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 86f4dc97c3..ceafaeda1d 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -262,7 +262,6 @@ class TestShutil(unittest.TestCase):
self.assertIn(errors[1][2][1].filename, possible_args)
- @unittest.skipUnless(hasattr(os, 'chmod'), 'requires os.chmod()')
@unittest.skipIf(sys.platform[:6] == 'cygwin',
"This test can't be run on Cygwin (issue #1071513).")
@unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
@@ -337,7 +336,6 @@ class TestShutil(unittest.TestCase):
finally:
os.lstat = orig_lstat
- @unittest.skipUnless(hasattr(os, 'chmod'), 'requires os.chmod')
@support.skip_unless_symlink
def test_copymode_follow_symlinks(self):
tmp_dir = self.mkdtemp()
@@ -1022,14 +1020,12 @@ class TestShutil(unittest.TestCase):
file2 = os.path.join(tmpdir2, fname)
return (file1, file2)
- @unittest.skipUnless(hasattr(os, 'chmod'), 'requires os.chmod')
def test_copy(self):
# Ensure that the copied file exists and has the same mode bits.
file1, file2 = self._copy_file(shutil.copy)
self.assertTrue(os.path.exists(file2))
self.assertEqual(os.stat(file1).st_mode, os.stat(file2).st_mode)
- @unittest.skipUnless(hasattr(os, 'chmod'), 'requires os.chmod')
@unittest.skipUnless(hasattr(os, 'utime'), 'requires os.utime')
def test_copy2(self):
# Ensure that the copied file exists and has the same mode and