Fix SF bug #690081, test_posix fails when run in non-interactive mode
Fix SF bug #690081, test_posix fails when run in non-interactive mode

Don't bother testing os.getlogin() if we aren't running from a tty (terminal)
It fails when run without a tty (e.g., when run from cron).

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator