summaryrefslogtreecommitdiff
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-03 21:17:52 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-03 21:17:52 +0300
commit90884dad8de46b8c5ea3292d85d108359423504d (patch)
treefdba504911f3e2dbed01cd93a708092dcbecd57c /Lib/test/test_pathlib.py
parentbeff68438de5647519bd37c3e055bc3cbee6c18f (diff)
parentfa87605cc4d6f44605411ba744c6c54aaa1e1f85 (diff)
downloadcpython-90884dad8de46b8c5ea3292d85d108359423504d.tar.gz
Issue #24950: Fixed expanduser tests when the users home directory in pwd is "/".
Based on patch by SilentGhost.
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index b32c9fbfa8..6119bc1c99 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -2062,7 +2062,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
import pwd
pwdent = pwd.getpwuid(os.getuid())
username = pwdent.pw_name
- userhome = pwdent.pw_dir.rstrip('/')
+ userhome = pwdent.pw_dir.rstrip('/') or '/'
# find arbitrary different user (if exists)
for pwdent in pwd.getpwall():
othername = pwdent.pw_name