[Python-Dev] test_posix failures?

Barry A. Warsaw barry@python.org
Mon, 17 Mar 2003 14:39:43 -0500

test_posix fails for me in current CVS:

ERROR: testNoArgFunctions (__main__.PosixTester)
Traceback (most recent call last):
  File "Lib/test/test_posix.py", line 46, in testNoArgFunctions
OSError: [Errno 2] No such file or directory

Ran 18 tests in 0.038s

narrowed down to posix.getlogin().  FTR I'm on RH7.3.

Here's the fun part <wink>: this succeeds if running in an xterm, but
fails if running in a XEmacs 21.4.11 shell buffer.  I tried it with
Emacs 21.2 as well and it also fails there.  A little C program
calling getlogin() gives the same results.  It also fails in a XEmacs
compilation buffer.

So the os.isatty() test isn't enough.  This returns True in all three
shells but getlogin() still fails.  The weird thing is that I've never
seen failures here before and I do this type of testing all the time.

Does anybody else see this?  Maybe we should just remove getlogin()