]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Enable extra testing now that os.isatty() is in. (Also tests os.isatty ;P)
authorThomas Wouters <thomas@python.org>
Wed, 19 Jul 2000 14:51:54 +0000 (14:51 +0000)
committerThomas Wouters <thomas@python.org>
Wed, 19 Jul 2000 14:51:54 +0000 (14:51 +0000)
Lib/test/test_openpty.py
Lib/test/test_pty.py

index cd939c69b473de41039f56bdb880aba1c62fa99d..1202845d9a22e433dcc14df5658e36f1f8e7288f 100644 (file)
@@ -12,11 +12,10 @@ try:
 except AttributeError:
     raise ImportError, "No openpty() available."
 
-## # Please uncomment these if os.isatty() is added.
-## if not os.isatty(master):
-##     raise TestFailed, "Master-end of pty is not a terminal."
-## if not os.isatty(slave):
-##     raise TestFailed, "Slave-end of pty is not a terminal."
+if not os.isatty(master):
+    raise TestFailed, "Master-end of pty is not a terminal."
+if not os.isatty(slave):
+    raise TestFailed, "Slave-end of pty is not a terminal."
 
 os.write(slave, 'Ping!')
 print os.read(master, 1024)
index 389d2a74e3e5613b15c7ac5812bb7bec7f5cd0b3..5551cd119e957cdfc991df12a957a646c0a3bb9f 100644 (file)
@@ -27,11 +27,10 @@ except OSError:
     # " An optional feature could not be imported " ... ?
     raise ImportError, "Pseudo-terminals (seemingly) not functional."
 
-## # Please uncomment these if os.isatty() is added.
-## if not os.isatty(master_fd):
-##     raise TestFailed, "master_fd is not a tty"
-## if not os.isatty(slave_fd):
-##     raise TestFailed, "slave_fd is not a tty"
+if not os.isatty(master_fd):
+    raise TestFailed, "master_fd is not a tty"
+if not os.isatty(slave_fd):
+    raise TestFailed, "slave_fd is not a tty"
 
 debug("Writing to slave_fd")
 os.write(slave_fd, TEST_STRING_1) # should check return value