mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'
This commit is contained in:
parent
95f42a86dd
commit
f2011e3e49
4 changed files with 6 additions and 2 deletions
|
|
@ -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(""), ".")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue