mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
8cd0a66a0f
commit
aa98058cc4
86 changed files with 622 additions and 599 deletions
|
|
@ -43,8 +43,8 @@ class PwdTest(unittest.TestCase):
|
|||
for e in entries:
|
||||
if not e[0] or e[0] == '+':
|
||||
continue # skip NIS entries etc.
|
||||
self.assertTrue(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
|
||||
self.assertTrue(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])
|
||||
self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
|
||||
self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
|
||||
|
||||
def test_errors(self):
|
||||
self.assertRaises(TypeError, pwd.getpwuid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue