From: Serhiy Storchaka Date: Thu, 18 Apr 2024 16:59:52 +0000 (+0300) Subject: gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056) X-Git-Tag: v3.13.0b1~351 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccdcd1d95a9d6eda4df86811c4539f204beef817;p=thirdparty%2FPython%2Fcpython.git gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056) --- diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 604af5bafa7f..32a20efbb64e 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -351,6 +351,7 @@ class PosixPathTest(unittest.TestCase): for e in pwd.getpwall(): name = e.pw_name home = e.pw_dir + home = home.rstrip('/') or '/' self.assertEqual(posixpath.expanduser('~' + name), home) self.assertEqual(posixpath.expanduser(os.fsencode('~' + name)), os.fsencode(home))