Skip to content

Commit

Permalink
bpo-32601: Let test_expanduser use the same user if no others found. (G…
Browse files Browse the repository at this point in the history
…H-5246)

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
  • Loading branch information
andersk authored and serhiy-storchaka committed May 14, 2018
1 parent 5cd22cf commit 5c0d462
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5c0d462

Please sign in to comment.