summaryrefslogtreecommitdiff
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:53:40 +0000
committerFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:53:40 +0000
commit7bddd8f52de80cae87be133b65c7f4e09d7136ff (patch)
treeac8ce52cb1e443184f2e3e2a91a4f011b6cce302 /Lib/test/test_pwd.py
parent38e837a30311d99658abe423e324be23381356c7 (diff)
downloadcpython-7bddd8f52de80cae87be133b65c7f4e09d7136ff.tar.gz
skip NIS entries, empty entries, etc
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r--Lib/test/test_pwd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index 69d88dde69..12d2bc9911 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -38,8 +38,8 @@ class PwdTest(unittest.TestCase):
# check whether the entry returned by getpwuid()
# for each uid is among those from getpwall() for this uid
for e in entries:
- if e[0] == '+':
- continue # skip NIS entries
+ if not e[0] or e[0] == '+':
+ continue # skip NIS entries etc.
self.assert_(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])