diff options
author | Jesus Cea <jcea@jcea.es> | 2012-05-10 03:16:41 (GMT) |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2012-05-10 03:16:41 (GMT) |
commit | b58ab2c6aa96a9320de2d4b2966e0e968ce5c524 (patch) | |
tree | 68d91f4bd84f4ce4be15692eabc5300f4e5e0539 /Lib/test/test_posixpath.py | |
parent | 3b1a74a9c39457112a5028775a795bd178ef072a (diff) | |
parent | 7f0d88860f04d6411dbc1218bf78d9ec5ce153b8 (diff) | |
download | cpython-b58ab2c6aa96a9320de2d4b2966e0e968ce5c524.zip cpython-b58ab2c6aa96a9320de2d4b2966e0e968ce5c524.tar.gz cpython-b58ab2c6aa96a9320de2d4b2966e0e968ce5c524.tar.bz2 |
MERGE: Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r-- | Lib/test/test_posixpath.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 709ef04..daebeaa 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -300,6 +300,7 @@ class PosixPathTest(unittest.TestCase): with support.EnvironmentVarGuard() as env: env['HOME'] = '/' self.assertEqual(posixpath.expanduser("~"), "/") + self.assertEqual(posixpath.expanduser("~/foo"), "/foo") # expanduser should fall back to using the password database del env['HOME'] home = pwd.getpwuid(os.getuid()).pw_dir |