commit | 6308d510e954ad1076b579d91e42874de6a0bcde | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue May 20 19:31:25 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue May 20 19:31:25 1997 +0000 |
tree | 82489c3ffef92f919a1ff266ca13620c99874e80 | |
parent | 037b2205e87e988063cd274fd20274b1848afc0e [diff] [blame] |
More robust way of choosing a non-existant uid (faster, too).
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py index 1c2208d..2fc8da8 100644 --- a/Lib/test/test_pwd.py +++ b/Lib/test/test_pwd.py
@@ -59,10 +59,10 @@ else: print 'fakename', fakename, 'did not except pwd.getpwnam()' -uids = byuids.keys() -uids.sort() -uids.reverse() -fakeuid = uids[0] + 1 +# Choose a non-existant uid. +fakeuid = 4127 +while byuids.has_key(fakeuid): + print 'fakeuid =', fakeuid try: pwd.getpwuid(fakeuid)