mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-9949: Call normpath() in realpath() and avoid unnecessary prefixes (GH-15369)
This commit is contained in:
parent
7ebdda0dbe
commit
06be2c7f35
2 changed files with 10 additions and 5 deletions
|
@ -333,11 +333,11 @@ class TestNtpath(unittest.TestCase):
|
|||
self.assertEqual(ntpath.realpath(ABSTFN + "1\\.."),
|
||||
ntpath.dirname(ABSTFN))
|
||||
self.assertEqual(ntpath.realpath(ABSTFN + "1\\..\\x"),
|
||||
ntpath.dirname(P + ABSTFN) + "\\x")
|
||||
ntpath.dirname(ABSTFN) + "\\x")
|
||||
os.symlink(ABSTFN + "x", ABSTFN + "y")
|
||||
self.assertEqual(ntpath.realpath(ABSTFN + "1\\..\\"
|
||||
+ ntpath.basename(ABSTFN) + "y"),
|
||||
P + ABSTFN + "x")
|
||||
ABSTFN + "x")
|
||||
self.assertIn(ntpath.realpath(ABSTFN + "1\\..\\"
|
||||
+ ntpath.basename(ABSTFN) + "1"),
|
||||
expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue