mirror of https://github.com/python/cpython
gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056)
This commit is contained in:
parent
94444ea45a
commit
ccdcd1d95a
|
@ -351,6 +351,7 @@ class PosixPathTest(unittest.TestCase):
|
|||
for e in pwd.getpwall():
|
||||
name = e.pw_name
|
||||
home = e.pw_dir
|
||||
home = home.rstrip('/') or '/'
|
||||
self.assertEqual(posixpath.expanduser('~' + name), home)
|
||||
self.assertEqual(posixpath.expanduser(os.fsencode('~' + name)),
|
||||
os.fsencode(home))
|
||||
|
|
Loading…
Reference in New Issue