summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-30 23:06:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-30 23:06:06 (GMT)
commitc9c0f201fed21efcf669dbbf5f923eaf0eeb1db9 (patch)
tree6350dab0b481e6de307dc4e043c6230f463a9ca7 /Lib/test/test_pwd.py
parent98d23f2e065713ccfbc07d9a0b65f737a212bfb5 (diff)
downloadcpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.zip
cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.gz
cpython-c9c0f201fed21efcf669dbbf5f923eaf0eeb1db9.tar.bz2
convert old fail* assertions to assert*
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)