Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'

This commit is contained in:
Jesus Cea 2012-05-10 05:01:11 +02:00
parent 95f42a86dd
commit f2011e3e49
4 changed files with 6 additions and 2 deletions

View file

@ -201,6 +201,7 @@ class PosixPathTest(unittest.TestCase):
with test_support.EnvironmentVarGuard() as env:
env['HOME'] = '/'
self.assertEqual(posixpath.expanduser("~"), "/")
self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
def test_normpath(self):
self.assertEqual(posixpath.normpath(""), ".")