summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-01-23 01:18:27 (GMT)
committerGuido van Rossum <guido@python.org>2008-01-23 01:18:27 (GMT)
commit66b4ab701be501a49424343cf02b103f4e5e9769 (patch)
tree31724357c252ab2f6ac099677a2d95f05086aa8a /Lib/test/test_pwd.py
parentc226c311392abbda437300eaa9841d9e839854c0 (diff)
downloadcpython-66b4ab701be501a49424343cf02b103f4e5e9769.zip
cpython-66b4ab701be501a49424343cf02b103f4e5e9769.tar.gz
cpython-66b4ab701be501a49424343cf02b103f4e5e9769.tar.bz2
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.
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 12d2bc9..74ce947 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: