]> granicus.if.org Git - python/commitdiff
Issue #19776: Fix test_pathlib.test_expanduser()
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 10 Jan 2015 08:00:20 +0000 (09:00 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 10 Jan 2015 08:00:20 +0000 (09:00 +0100)
Skip users with an empty home directory.

Lib/test/test_pathlib.py

index 1beb84d87c56b96a3a6d1097289cf18318447100..2e97a5e2de1a2a783fe2c38553c1664c8f6f0208 100644 (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')