[Python-checkins] cpython (3.2): Skip early if stdin and stdout are not ttys
antoine.pitrou
python-checkins at python.org
Sun Nov 6 03:10:50 CET 2011
http://hg.python.org/cpython/rev/a09677cb4831
changeset: 73397:a09677cb4831
branch: 3.2
parent: 73395:da46c53bb410
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Nov 06 03:03:18 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
@@ -996,6 +996,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