mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Issue 19572: More silently skipped tests explicitly skipped.
This commit is contained in:
parent
774f909489
commit
9fe6d86709
34 changed files with 122 additions and 134 deletions
|
|
@ -8,8 +8,6 @@ class PwdTest(unittest.TestCase):
|
|||
|
||||
def test_values(self):
|
||||
entries = pwd.getpwall()
|
||||
entriesbyname = {}
|
||||
entriesbyuid = {}
|
||||
|
||||
for e in entries:
|
||||
self.assertEqual(len(e), 7)
|
||||
|
|
@ -32,13 +30,20 @@ class PwdTest(unittest.TestCase):
|
|||
# for one uid
|
||||
# self.assertEqual(pwd.getpwuid(e.pw_uid), e)
|
||||
# instead of this collect all entries for one uid
|
||||
# and check afterwards
|
||||
# and check afterwards (done in test_values_extended)
|
||||
|
||||
def test_values_extended(self):
|
||||
entries = pwd.getpwall()
|
||||
entriesbyname = {}
|
||||
entriesbyuid = {}
|
||||
|
||||
if len(entries) > 1000: # Huge passwd file (NIS?) -- skip this test
|
||||
self.skipTest('passwd file is huge; extended test skipped')
|
||||
|
||||
for e in entries:
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue