This commit is contained in:
Richard Oudkerk 2013-06-10 16:31:39 +01:00
commit a35a128acc
3 changed files with 5 additions and 1 deletions

View file

@ -10,6 +10,8 @@ if not hasattr(os, "openpty"):
class OpenptyTest(unittest.TestCase):
def test(self):
master, slave = os.openpty()
self.addCleanup(os.close, master)
self.addCleanup(os.close, slave)
if not os.isatty(slave):
self.fail("Slave-end of pty is not a terminal.")