mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-46933: Make pwd module optional (GH-31700)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
This commit is contained in:
parent
3b3be05a16
commit
ca9689f8da
11 changed files with 496 additions and 560 deletions
|
|
@ -248,7 +248,10 @@ class UtilTestCase(support.EnvironGuard, unittest.TestCase):
|
|||
util._environ_checked = 0
|
||||
os.environ.pop('HOME', None)
|
||||
|
||||
import pwd
|
||||
try:
|
||||
import pwd
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("Test requires pwd module.")
|
||||
|
||||
# only set pw_dir field, other fields are not used
|
||||
result = pwd.struct_passwd((None, None, None, None, None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue