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

Commitd3cda85

Browse files
vstinnernoahbkim
authored andcommitted
pythongh-121200: Log pwd entry in test_expanduser_pwd2() (python#121207)
Use subTest() to log the pwd entry in test_expanduser_pwd2() oftest_posixpath to help debugging.
1 parent7c568e4 commitd3cda85

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎Lib/test/test_posixpath.py‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,14 @@ def test_expanduser_pwd(self):
359359
"no home directory on VxWorks")
360360
deftest_expanduser_pwd2(self):
361361
pwd=import_helper.import_module('pwd')
362-
foreinpwd.getpwall():
363-
name=e.pw_name
364-
home=e.pw_dir
362+
forentryinpwd.getpwall():
363+
name=entry.pw_name
364+
home=entry.pw_dir
365365
home=home.rstrip('/')or'/'
366-
self.assertEqual(posixpath.expanduser('~'+name),home)
367-
self.assertEqual(posixpath.expanduser(os.fsencode('~'+name)),
368-
os.fsencode(home))
366+
withself.subTest(pwd=entry):
367+
self.assertEqual(posixpath.expanduser('~'+name),home)
368+
self.assertEqual(posixpath.expanduser(os.fsencode('~'+name)),
369+
os.fsencode(home))
369370

370371
NORMPATH_CASES= [
371372
("","."),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp