summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r--Lib/test/test_pwd.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index 450306c..406578a 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -13,19 +13,19 @@ class PwdTest(unittest.TestCase):
for e in entries:
self.assertEqual(len(e), 7)
self.assertEqual(e[0], e.pw_name)
- self.assert_(isinstance(e.pw_name, str))
+ self.assertTrue(isinstance(e.pw_name, str))
self.assertEqual(e[1], e.pw_passwd)
- self.assert_(isinstance(e.pw_passwd, str))
+ self.assertTrue(isinstance(e.pw_passwd, str))
self.assertEqual(e[2], e.pw_uid)
- self.assert_(isinstance(e.pw_uid, int))
+ self.assertTrue(isinstance(e.pw_uid, int))
self.assertEqual(e[3], e.pw_gid)
- self.assert_(isinstance(e.pw_gid, int))
+ self.assertTrue(isinstance(e.pw_gid, int))
self.assertEqual(e[4], e.pw_gecos)
- self.assert_(isinstance(e.pw_gecos, str))
+ self.assertTrue(isinstance(e.pw_gecos, str))
self.assertEqual(e[5], e.pw_dir)
- self.assert_(isinstance(e.pw_dir, str))
+ self.assertTrue(isinstance(e.pw_dir, str))
self.assertEqual(e[6], e.pw_shell)
- self.assert_(isinstance(e.pw_shell, str))
+ self.assertTrue(isinstance(e.pw_shell, str))
# The following won't work, because of duplicate entries
# for one uid
@@ -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.assert_(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
- self.assert_(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])
+ self.assertTrue(pwd.getpwnam(e.pw_name) in entriesbyname[e.pw_name])
+ self.assertTrue(pwd.getpwuid(e.pw_uid) in entriesbyuid[e.pw_uid])
def test_errors(self):
self.assertRaises(TypeError, pwd.getpwuid)