diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-12-28 14:31:47 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-12-28 14:31:47 (GMT) |
commit | 3b4499c5c7718a2aca8558b857dfe02cc4a80cd9 (patch) | |
tree | e952e750f0913c99ca1d4b021736476baab55408 /Lib/test/test_shutil.py | |
parent | baab9d0bf6d1627aa292a7639878ae9ba46fc2ca (diff) | |
download | cpython-3b4499c5c7718a2aca8558b857dfe02cc4a80cd9.zip cpython-3b4499c5c7718a2aca8558b857dfe02cc4a80cd9.tar.gz cpython-3b4499c5c7718a2aca8558b857dfe02cc4a80cd9.tar.bz2 |
Fix #9333. The symlink function is always available now, raising OSError
when the user doesn't hold the symbolic link privilege rather than hiding it.
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index d9e9678..30d9e07 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -291,8 +291,7 @@ class TestShutil(unittest.TestCase): finally: shutil.rmtree(TESTFN, ignore_errors=True) - @unittest.skipUnless(hasattr(os, "symlink"), - "Missing symlink implementation") + @support.skip_unless_symlink def test_dont_copy_file_onto_symlink_to_itself(self): # bug 851123. os.mkdir(TESTFN) @@ -312,8 +311,7 @@ class TestShutil(unittest.TestCase): finally: shutil.rmtree(TESTFN, ignore_errors=True) - @unittest.skipUnless(hasattr(os, "symlink"), - "Missing symlink implementation") + @support.skip_unless_symlink def test_rmtree_on_symlink(self): # bug 1669. os.mkdir(TESTFN) @@ -338,8 +336,7 @@ class TestShutil(unittest.TestCase): finally: os.remove(TESTFN) - @unittest.skipUnless(hasattr(os, "symlink"), - "Missing symlink implementation") + @support.skip_unless_symlink def test_copytree_named_pipe(self): os.mkdir(TESTFN) try: @@ -375,8 +372,7 @@ class TestShutil(unittest.TestCase): shutil.copytree(src_dir, dst_dir, copy_function=_copy) self.assertEqual(len(copied), 2) - @unittest.skipUnless(hasattr(os, "symlink"), - "Missing symlink implementation") + @support.skip_unless_symlink def test_copytree_dangling_symlinks(self): # a dangling symlink raises an error at the end |