diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 53215550b4354e..d1a3fba2ded908 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -2142,6 +2142,9 @@ def test_expanduser(self): otherhome = pwdent.pw_dir.rstrip('/') if othername != username and otherhome: break + else: + othername = username + otherhome = userhome p1 = P('~/Documents') p2 = P('~' + username + '/Documents')