mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287)
This commit is contained in:
parent
e1c638da6a
commit
75e064962e
8 changed files with 304 additions and 32 deletions
|
@ -1871,11 +1871,7 @@ class TestMove(unittest.TestCase):
|
|||
dst_link = os.path.join(self.dst_dir, 'quux')
|
||||
shutil.move(dst, dst_link)
|
||||
self.assertTrue(os.path.islink(dst_link))
|
||||
# On Windows, os.path.realpath does not follow symlinks (issue #9949)
|
||||
if os.name == 'nt':
|
||||
self.assertEqual(os.path.realpath(src), os.readlink(dst_link))
|
||||
else:
|
||||
self.assertEqual(os.path.realpath(src), os.path.realpath(dst_link))
|
||||
self.assertEqual(os.path.realpath(src), os.path.realpath(dst_link))
|
||||
|
||||
@support.skip_unless_symlink
|
||||
@mock_rename
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue