aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit0e120525f0a2dfcd417905593cad27169907a4d5 (patch)
tree70b1e22f6217249335602dc1650d834b1fb172be /Lib/test/test_pathlib.py
parent478be14ec0a2ae44e6ab78ed79ea8d238581a4d2 (diff)
parenta3fd0b26ba7d302475e051b698c86f512d0e7a14 (diff)
downloadcpython-0e120525f0a2dfcd417905593cad27169907a4d5.tar.gz
cpython-0e120525f0a2dfcd417905593cad27169907a4d5.zip
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 b32c9fbfa83..6119bc1c99a 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