From: Antoine Pitrou Date: Sun, 6 Nov 2011 02:03:18 +0000 (+0100) Subject: Skip early if stdin and stdout are not ttys X-Git-Tag: v3.2.3rc1~418 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1;p=thirdparty%2FPython%2Fcpython.git Skip early if stdin and stdout are not ttys --- diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 244e55ffb53a..55fb63ae3f5b 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -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()