]> granicus.if.org Git - python/commitdiff
skip nis entries, if not filtered out by getpwall itself
authorFredrik Lundh <fredrik@pythonware.com>
Mon, 12 Dec 2005 20:46:31 +0000 (20:46 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Mon, 12 Dec 2005 20:46:31 +0000 (20:46 +0000)
Lib/test/test_pwd.py

index bb07c2b699898c8d473ffa73684bd0570d271774..69d88dde6934d3520c4262d884ea9b46d9dcfc11 100644 (file)
@@ -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])