summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r--Lib/test/test_pwd.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index 358b8b3..19187a3 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -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: