From 80768f86359ddd9006301baefae9398364c55eb2 Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Mon, 12 Dec 2005 20:46:31 +0000 Subject: [PATCH] skip nis entries, if not filtered out by getpwall itself --- Lib/test/test_pwd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py index bb07c2b6998..69d88dde693 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])