mirror of
https://github.com/python/cpython.git
synced 2025-12-08 02:08:20 +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():
|
for pwdent in pwd.getpwall():
|
||||||
othername = pwdent.pw_name
|
othername = pwdent.pw_name
|
||||||
otherhome = pwdent.pw_dir.rstrip('/')
|
otherhome = pwdent.pw_dir.rstrip('/')
|
||||||
if othername != username:
|
if othername != username and otherhome:
|
||||||
break
|
break
|
||||||
|
|
||||||
p1 = P('~/Documents')
|
p1 = P('~/Documents')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue