[Python-checkins] r60209 - python/branches/release25-maint/Lib/test/test_grp.py python/branches/release25-maint/Lib/test/test_pwd.py
guido.van.rossum
python-checkins at python.org
Wed Jan 23 02:20:27 CET 2008
Author: guido.van.rossum
Date: Wed Jan 23 02:20:26 2008
New Revision: 60209
Modified:
python/branches/release25-maint/Lib/test/test_grp.py
python/branches/release25-maint/Lib/test/test_pwd.py
Log:
Backport r60208, skip some tests for huge passwd/group files.
Modified: python/branches/release25-maint/Lib/test/test_grp.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_grp.py (original)
+++ python/branches/release25-maint/Lib/test/test_grp.py Wed Jan 23 02:20:26 2008
@@ -25,6 +25,9 @@
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)
Modified: python/branches/release25-maint/Lib/test/test_pwd.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_pwd.py (original)
+++ python/branches/release25-maint/Lib/test/test_pwd.py Wed Jan 23 02:20:26 2008
@@ -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:
More information about the Python-checkins
mailing list