Issue #19776: Fix test_pathlib.test_expanduser()

Skip users with an empty home directory.
This commit is contained in:
Victor Stinner 2015-01-10 09:00:20 +01:00
parent 645f896536
commit e969439862

View File

@ -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')