summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:46:31 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2005-12-12 20:46:31 (GMT)
commit80768f86359ddd9006301baefae9398364c55eb2 (patch)
treeba6b75c0a6eb6accdf5cf02e8ea683b4bd423e09 /Lib/test/test_pwd.py
parent2a60d9ac2d0153622fab5212e4e06a8ec6e8bd38 (diff)
downloadcpython-80768f86359ddd9006301baefae9398364c55eb2.zip
cpython-80768f86359ddd9006301baefae9398364c55eb2.tar.gz
cpython-80768f86359ddd9006301baefae9398364c55eb2.tar.bz2
skip nis entries, if not filtered out by getpwall itself
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r--Lib/test/test_pwd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index bb07c2b..69d88dd 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -38,6 +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
self.assert_(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])