Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe1fe11

Browse files
[3.12]gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056) (GH-118058)
(cherry picked from commitccdcd1d)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parentdd8b4d4 commitbe1fe11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎Lib/test/test_posixpath.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ def test_expanduser_pwd2(self):
341341
foreinpwd.getpwall():
342342
name=e.pw_name
343343
home=e.pw_dir
344+
home=home.rstrip('/')or'/'
344345
self.assertEqual(posixpath.expanduser('~'+name),home)
345346
self.assertEqual(posixpath.expanduser(os.fsencode('~'+name)),
346347
os.fsencode(home))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp