]> granicus.if.org Git - python/commitdiff
Fix SF bug #697556, test_posix fails: getlogin
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 18 Mar 2003 13:30:14 +0000 (13:30 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 18 Mar 2003 13:30:14 +0000 (13:30 +0000)
getlogin() can fail for too many reasons, so remove the test

Lib/test/test_posix.py

index feb033d54db531d9542fd42d7588a4f859e0e201..5a0028c870c7cad2547d9ec31761fccb77236b39 100644 (file)
@@ -33,12 +33,6 @@ class PosixTester(unittest.TestCase):
                              "getegid", "geteuid", "getgid", "getgroups",
                              "getpid", "getpgrp", "getppid", "getuid",
                            ]
-        # getlogin() only works when run from a tty (terminal)
-        try:
-            if os.isatty(sys.stdin.fileno()):
-                NO_ARG_FUNCTIONS.append("getlogin")
-        except:
-            pass
 
         for name in NO_ARG_FUNCTIONS:
             posix_func = getattr(posix, name, None)