I'm tired of these tests breaking at Google due to our large number of
users and groups in LDAP/NIS. So I'm limiting the extra-heavy part of
the tests to passwd/group files with at most 1000 entries.
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index 12d2bc9..74ce947 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -35,6 +35,9 @@
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: