diff options
author | Georg Brandl <georg@python.org> | 2009-08-13 08:51:18 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-08-13 08:51:18 (GMT) |
commit | ab91fdef1f1e556203a2eee98ba7d379e4790de9 (patch) | |
tree | 6f8f00dc18cc5f2801a675df277c2c595eb85ec8 /Lib/test/test_pwd.py | |
parent | ef82be368abdea8e8032500e7ecc3a22f5f07851 (diff) | |
download | cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.zip cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.gz cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.bz2 |
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line
convert old fail* assertions to assert*
........
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r-- | Lib/test/test_pwd.py | 18 |
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) |