summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-11-06 02:03:18 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-11-06 02:03:18 (GMT)
commit1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1 (patch)
tree81cdd7f04e2c25b9e127521dc1b36111db0d6c0f /Lib/test
parent413d4972477b816ea6b400f18ec9fe1c9360fe69 (diff)
downloadcpython-1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1.zip
cpython-1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1.tar.gz
cpython-1ce4b14c4d8a5b5ff8de7d1a4aabf053d550d7d1.tar.bz2
Skip early if stdin and stdout are not ttys
Diffstat (limited to 'Lib/test')
-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 244e55f..55fb63a 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()