Kaydet (Commit) 2c634425 authored tarafından Guido van Rossum's avatar Guido van Rossum

Backport r60208, skip some tests for huge passwd/group files.

üst 7bf216b0
......@@ -25,6 +25,9 @@ class GroupDatabaseTestCase(unittest.TestCase):
for e in entries:
self.check_value(e)
if len(entries) > 1000: # Huge group file (NIS?) -- skip the rest
return
for e in entries:
e2 = grp.getgrgid(e.gr_gid)
self.check_value(e2)
......
......@@ -35,6 +35,9 @@ class PwdTest(unittest.TestCase):
entriesbyname.setdefault(e.pw_name, []).append(e)
entriesbyuid.setdefault(e.pw_uid, []).append(e)
if len(entries) > 1000: # Huge passwd file (NIS?) -- skip the rest
return
# check whether the entry returned by getpwuid()
# for each uid is among those from getpwall() for this uid
for e in entries:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment