cpython: aad7e68eff0a (original) (raw)

Mercurial > cpython

changeset 82249:aad7e68eff0a 3.3

Fix posixpath.realpath() for multiple pardirs (fixes issue #6975). [#6975]

Serhiy Storchaka storchaka@gmail.com
date Mon, 18 Feb 2013 12:21:30 +0200
parents 88c04657c9f1(current diff)cb3fbadb65aa(diff)
children f99ff3b01fab 38bb2a46692e
files Lib/posixpath.py Lib/test/test_posixpath.py
diffstat 2 files changed, 22 insertions(+), 2 deletions(-)[+] [-] Lib/posixpath.py 6 Lib/test/test_posixpath.py 18

line wrap: on

line diff

--- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -418,9 +418,11 @@ def _joinrealpath(path, rest, seen): if name == pardir: # parent dir if path:

--- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -340,6 +340,24 @@ class PosixPathTest(unittest.TestCase): self.assertEqual(posixpath.normpath(b"///..//./foo/.//bar"), b"/foo/bar")

+

+

+

+ @unittest.skipUnless(hasattr(os, "symlink"), "Missing symlink implementation") @skip_if_ABSTFN_contains_backslash