mirror of https://github.com/python/cpython
Skip early if stdin and stdout are not ttys
This commit is contained in:
parent
413d497247
commit
1ce4b14c4d
|
@ -996,6 +996,8 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
@unittest.skipUnless(pty, "the pty and signal modules must be available")
|
||||
def check_input_tty(self, prompt, terminal_input, stdio_encoding=None):
|
||||
if not sys.stdin.isatty() or not sys.stdout.isatty():
|
||||
self.skipTest("stdin and stdout must be ttys")
|
||||
r, w = os.pipe()
|
||||
try:
|
||||
pid, fd = pty.fork()
|
||||
|
|
Loading…
Reference in New Issue