summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-11-06 02:04:12 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-11-06 02:04:12 (GMT)
commitdeb925fc14fb12f9ef2a0773eb80ad81db7ec3ac (patch)
treed242ae70bc209cab04417f8b917d7a154de3a06d /Lib/test/test_builtin.py
parent0cbc68605862a14e05e3c7460e669308672869b6 (diff)
parent1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1 (diff)
downloadcpython-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.py2
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()