diff options
Diffstat (limited to 'Lib/test/test_getpass.py')
-rw-r--r-- | Lib/test/test_getpass.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_getpass.py b/Lib/test/test_getpass.py index 3452e46..98ecec9 100644 --- a/Lib/test/test_getpass.py +++ b/Lib/test/test_getpass.py @@ -28,6 +28,9 @@ class GetpassGetuserTest(unittest.TestCase): getpass.getuser() except ImportError: # in case there's no pwd module pass + except KeyError: + # current user has no pwd entry + pass self.assertEqual( environ.get.call_args_list, [mock.call(x) for x in ('LOGNAME', 'USER', 'LNAME', 'USERNAME')]) |