We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 001f6db commit 2d6b2d5Copy full SHA for 2d6b2d5
1 file changed
Lib/test/test_pathlib/test_pathlib.py
@@ -3212,14 +3212,15 @@ def test_touch_mode(self):
3212
st = os.stat(self.parser.join(self.base, 'masked_new_file'))
3213
self.assertEqual(stat.S_IMODE(st.st_mode), 0o750)
3214
3215
- @unittest.skipUnless(pwd, "the pwd module is needed for this test")
3216
@unittest.skipUnless(hasattr(pwd, 'getpwall'),
3217
'pwd module does not expose getpwall()')
3218
@unittest.skipIf(sys.platform == "vxworks",
3219
"no home directory on VxWorks")
3220
@needs_posix
3221
def test_expanduser_posix(self):
3222
P = self.cls
+ import_helper.import_module('pwd')
3223
+ import pwd
3224
pwdent = pwd.getpwuid(os.getuid())
3225
username = pwdent.pw_name
3226
userhome = pwdent.pw_dir.rstrip('/') or '/'
0 commit comments