mirror of https://github.com/python/cpython
Skip early if stdin and stdout are not ttys
This commit is contained in:
commit
deb925fc14
|
@ -1008,6 +1008,8 @@ class BuiltinTest(unittest.TestCase):
|
||||||
|
|
||||||
@unittest.skipUnless(pty, "the pty and signal modules must be available")
|
@unittest.skipUnless(pty, "the pty and signal modules must be available")
|
||||||
def check_input_tty(self, prompt, terminal_input, stdio_encoding=None):
|
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()
|
r, w = os.pipe()
|
||||||
try:
|
try:
|
||||||
pid, fd = pty.fork()
|
pid, fd = pty.fork()
|
||||||
|
|
Loading…
Reference in New Issue