diff options
Diffstat (limited to 'Lib/distutils/tests/test_util.py')
-rw-r--r-- | Lib/distutils/tests/test_util.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_util.py b/Lib/distutils/tests/test_util.py index 812d44e..f9c223f 100644 --- a/Lib/distutils/tests/test_util.py +++ b/Lib/distutils/tests/test_util.py @@ -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, |