[Python-checkins] r60208 - python/trunk/Lib/test/test_grp.py python/trunk/Lib/test/test_pwd.py
guido.van.rossum
python-checkins at python.org
Wed Jan 23 02:18:28 CET 2008
Author: guido.van.rossum
Date: Wed Jan 23 02:18:27 2008
New Revision: 60208
Modified:
python/trunk/Lib/test/test_grp.py
python/trunk/Lib/test/test_pwd.py
Log:
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.
Modified: python/trunk/Lib/test/test_grp.py
==============================================================================
--- python/trunk/Lib/test/test_grp.py (original)
+++ python/trunk/Lib/test/test_grp.py Wed Jan 23 02:18:27 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/trunk/Lib/test/test_pwd.py
==============================================================================
--- python/trunk/Lib/test/test_pwd.py (original)
+++ python/trunk/Lib/test/test_pwd.py Wed Jan 23 02:18:27 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