Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit deb925f

Browse files
committed
Skip early if stdin and stdout are not ttys
2 parents 0cbc686 + 1ce4b14 commit deb925f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_builtin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,8 @@ def test_input(self):
10081008

10091009
@unittest.skipUnless(pty, "the pty and signal modules must be available")
10101010
def check_input_tty(self, prompt, terminal_input, stdio_encoding=None):
1011+
if not sys.stdin.isatty() or not sys.stdout.isatty():
1012+
self.skipTest("stdin and stdout must be ttys")
10111013
r, w = os.pipe()
10121014
try:
10131015
pid, fd = pty.fork()

0 commit comments

Comments
 (0)