[Python-checkins] cpython (merge 3.2 -> default): Skip early if stdin and stdout are not ttys
antoine.pitrou
python-checkins at python.org
Sun Nov 6 03:10:51 CET 2011
http://hg.python.org/cpython/rev/7790ad507972
changeset: 73398:7790ad507972
parent: 73396:d4d00652e980
parent: 73397:a09677cb4831
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Nov 06 03:04:12 2011 +0100
summary:
Skip early if stdin and stdout are not ttys
files:
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
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -1008,6 +1008,8 @@
@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()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list