Lines Matching refs:pwd
5 pwd = import_helper.import_module('pwd') variable
7 @unittest.skipUnless(hasattr(pwd, 'getpwall'), 'Does not have getpwall()')
11 entries = pwd.getpwall()
37 entries = pwd.getpwall()
53 self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
54 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
57 self.assertRaises(TypeError, pwd.getpwuid)
58 self.assertRaises(TypeError, pwd.getpwuid, 3.14)
59 self.assertRaises(TypeError, pwd.getpwnam)
60 self.assertRaises(TypeError, pwd.getpwnam, 42)
61 self.assertRaises(TypeError, pwd.getpwall, 42)
66 for (n, p, u, g, gecos, d, s) in pwd.getpwall():
93 self.assertRaises(KeyError, pwd.getpwnam, fakename)
102 self.assertRaises(KeyError, pwd.getpwuid, fakeuid)
106 self.assertRaises(KeyError, pwd.getpwuid, -1)
108 self.assertRaises(KeyError, pwd.getpwuid, 2**128)
109 self.assertRaises(KeyError, pwd.getpwuid, -2**128)