mirror of https://github.com/python/cpython
#17809: fix a test failure in test_expanduser when $HOME has a trailing /. Patch by Kubilay Kocak.
This commit is contained in:
parent
263fab94ee
commit
ce82d57c74
|
@ -318,7 +318,8 @@ class PosixPathTest(unittest.TestCase):
|
|||
# expanduser should fall back to using the password database
|
||||
del env['HOME']
|
||||
home = pwd.getpwuid(os.getuid()).pw_dir
|
||||
self.assertEqual(posixpath.expanduser("~"), home)
|
||||
# $HOME can end with a trailing /, so strip it (see #17809)
|
||||
self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
|
||||
|
||||
def test_normpath(self):
|
||||
self.assertEqual(posixpath.normpath(""), ".")
|
||||
|
|
Loading…
Reference in New Issue