cpython: cbc78ca21977 (original) (raw)

Mercurial > cpython

changeset 102745:cbc78ca21977 3.5

#2466: ismount now recognizes mount points user can't access. Patch by Robin Roth, reviewed by Serhiy Storchaka, comment wording tweaked by me. [#2466]

R David Murray rdmurray@bitdance.com
date Thu, 18 Aug 2016 21:27:48 -0400
parents ba45fbb16499
children db9126139969 bad82d4bdf8c
files Lib/posixpath.py Lib/test/test_posixpath.py Misc/ACKS Misc/NEWS
diffstat 4 files changed, 27 insertions(+), 2 deletions(-)[+] [-] Lib/posixpath.py 1 Lib/test/test_posixpath.py 24 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -193,6 +193,7 @@ def ismount(path): parent = join(path, b'..') else: parent = join(path, '..')

--- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -1,7 +1,5 @@ -import itertools import os import posixpath -import sys import unittest import warnings from posixpath import realpath, abspath, dirname, basename @@ -213,6 +211,28 @@ class PosixPathTest(unittest.TestCase): finally: os.lstat = save_lstat

+ def test_expanduser(self): self.assertEqual(posixpath.expanduser("foo"), "foo") self.assertEqual(posixpath.expanduser(b"foo"), b"foo")

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -1258,6 +1258,7 @@ Guido van Rossum Just van Rossum Hugo van Rossum Saskia van Rossum +Robin Roth Clement Rouault Donald Wallace Rouse II Liam Routt

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -38,6 +38,9 @@ Core and Builtins Library ------- +- Issue #2466: posixpath.ismount now correctly recognizes mount points which