mirror of
https://github.com/python/cpython.git
synced 2025-10-15 11:22:18 +00:00
skip nis entries, if not filtered out by getpwall itself
This commit is contained in:
parent
2a60d9ac2d
commit
80768f8635
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ class PwdTest(unittest.TestCase):
|
||||||
# check whether the entry returned by getpwuid()
|
# check whether the entry returned by getpwuid()
|
||||||
# for each uid is among those from getpwall() for this uid
|
# for each uid is among those from getpwall() for this uid
|
||||||
for e in entries:
|
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.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
|
||||||
self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])
|
self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue