summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-05-10 03:10:50 (GMT)
committerJesus Cea <jcea@jcea.es>2012-05-10 03:10:50 (GMT)
commit7f0d88860f04d6411dbc1218bf78d9ec5ce153b8 (patch)
tree8c08d2d132666b6f9924d6e7d1f0acbd6e3c0d4a /Lib/test
parentd576c711a510204604f707e1cbf773b4a39f21a3 (diff)
downloadcpython-7f0d88860f04d6411dbc1218bf78d9ec5ce153b8.zip
cpython-7f0d88860f04d6411dbc1218bf78d9ec5ce153b8.tar.gz
cpython-7f0d88860f04d6411dbc1218bf78d9ec5ce153b8.tar.bz2
Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_posixpath.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index bb4559c..a7a3e4a 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -298,6 +298,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