diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-06 02:04:12 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-06 02:04:12 (GMT) |
commit | deb925fc14fb12f9ef2a0773eb80ad81db7ec3ac (patch) | |
tree | d242ae70bc209cab04417f8b917d7a154de3a06d /Lib/test/test_builtin.py | |
parent | 0cbc68605862a14e05e3c7460e669308672869b6 (diff) | |
parent | 1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1 (diff) | |
download | cpython-deb925fc14fb12f9ef2a0773eb80ad81db7ec3ac.zip cpython-deb925fc14fb12f9ef2a0773eb80ad81db7ec3ac.tar.gz cpython-deb925fc14fb12f9ef2a0773eb80ad81db7ec3ac.tar.bz2 |
Skip early if stdin and stdout are not ttys
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r-- | Lib/test/test_builtin.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 0083de9..bfa5ee7 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1008,6 +1008,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() |