self._test_invalid_env(os.spawnvpe)
-# The introduction of this TestCase caused at least two different errors on
-# *nix buildbots. Temporarily skip this to let the buildbots move along.
-@unittest.skip("Skip due to platform/environment differences on *NIX buildbots")
@unittest.skipUnless(hasattr(os, 'getlogin'), "test needs os.getlogin")
class LoginTests(unittest.TestCase):
def test_getlogin(self):
- user_name = os.getlogin()
+ try:
+ user_name = os.getlogin()
+ except OSError as exc:
+ if exc.errno in (errno.ENOTTY, errno.ENXIO):
+ self.skipTest(str(exc))
+ else:
+ raise
self.assertNotEqual(len(user_name), 0)