mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
This commit is contained in:
parent
60d241f135
commit
3172c5d263
77 changed files with 171 additions and 217 deletions
|
@ -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, basestring))
|
||||
self.assert_(isinstance(e.pw_name, str))
|
||||
self.assertEqual(e[1], e.pw_passwd)
|
||||
self.assert_(isinstance(e.pw_passwd, basestring))
|
||||
self.assert_(isinstance(e.pw_passwd, str))
|
||||
self.assertEqual(e[2], e.pw_uid)
|
||||
self.assert_(isinstance(e.pw_uid, int))
|
||||
self.assertEqual(e[3], e.pw_gid)
|
||||
self.assert_(isinstance(e.pw_gid, int))
|
||||
self.assertEqual(e[4], e.pw_gecos)
|
||||
self.assert_(isinstance(e.pw_gecos, basestring))
|
||||
self.assert_(isinstance(e.pw_gecos, str))
|
||||
self.assertEqual(e[5], e.pw_dir)
|
||||
self.assert_(isinstance(e.pw_dir, basestring))
|
||||
self.assert_(isinstance(e.pw_dir, str))
|
||||
self.assertEqual(e[6], e.pw_shell)
|
||||
self.assert_(isinstance(e.pw_shell, basestring))
|
||||
self.assert_(isinstance(e.pw_shell, str))
|
||||
|
||||
# The following won't work, because of duplicate entries
|
||||
# for one uid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue