From: Ezio Melotti Date: Thu, 9 May 2013 12:19:45 +0000 (+0300) Subject: #17809: fix a test failure in test_expanduser when $HOME has a trailing /. Patch... X-Git-Tag: v3.3.2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce82d57c7480c7360539c9e606d0b2f620e0c181;p=thirdparty%2FPython%2Fcpython.git #17809: fix a test failure in test_expanduser when $HOME has a trailing /. Patch by Kubilay Kocak. --- diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 724c53026123..0e7d86648582 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -318,7 +318,8 @@ class PosixPathTest(unittest.TestCase): # expanduser should fall back to using the password database del env['HOME'] home = pwd.getpwuid(os.getuid()).pw_dir - self.assertEqual(posixpath.expanduser("~"), home) + # $HOME can end with a trailing /, so strip it (see #17809) + self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) def test_normpath(self): self.assertEqual(posixpath.normpath(""), ".") diff --git a/Misc/ACKS b/Misc/ACKS index ed30056c6a06..90913acb65e8 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -648,6 +648,7 @@ Kim Knapp Lenny Kneler Pat Knight Jeff Knupp +Kubilay Kocak Greg Kochanski Damon Kohler Marko Kohtala