mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Issue #19776: Fix test_pathlib.test_expanduser()
Skip users with an empty home directory.
This commit is contained in:
parent
645f896536
commit
e969439862
1 changed files with 1 additions and 1 deletions
|
|
@ -1983,7 +1983,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
|
|||
for pwdent in pwd.getpwall():
|
||||
othername = pwdent.pw_name
|
||||
otherhome = pwdent.pw_dir.rstrip('/')
|
||||
if othername != username:
|
||||
if othername != username and otherhome:
|
||||
break
|
||||
|
||||
p1 = P('~/Documents')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue